mirror of
https://github.com/neondatabase/neon.git
synced 2026-01-06 04:52:55 +00:00
Fix clippy lints and enable clippy checking in CI
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
use anyhow::anyhow;
|
||||
use hyper::{header, Body, Response, StatusCode};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use serde_json;
|
||||
use thiserror::Error;
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
@@ -56,10 +55,10 @@ impl HttpErrorBody {
|
||||
}
|
||||
|
||||
pub fn response_from_msg_and_status(msg: String, status: StatusCode) -> Response<Body> {
|
||||
HttpErrorBody { msg }.into_response(status)
|
||||
HttpErrorBody { msg }.to_response(status)
|
||||
}
|
||||
|
||||
pub fn into_response(&self, status: StatusCode) -> Response<Body> {
|
||||
pub fn to_response(&self, status: StatusCode) -> Response<Body> {
|
||||
Response::builder()
|
||||
.status(status)
|
||||
.header(header::CONTENT_TYPE, "application/json")
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
use bytes::Buf;
|
||||
use hyper::{header, Body, Request, Response, StatusCode};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use serde_json;
|
||||
|
||||
use super::error::ApiError;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user