refactor(http): directly use Error from import

This commit is contained in:
Ryan 2025-03-27 18:00:37 -04:00
parent 1dc6519d0c
commit 5e57678d5c
Signed by: ErrorNoInternet
GPG Key ID: 2486BFB7B1E6A4A3

View File

@ -49,13 +49,13 @@ fn status_code_response(
response
}
fn full<T: Into<Bytes>>(chunk: T) -> BoxBody<Bytes, hyper::Error> {
fn full<T: Into<Bytes>>(chunk: T) -> BoxBody<Bytes, Error> {
Full::new(chunk.into())
.map_err(|never| match never {})
.boxed()
}
fn empty() -> BoxBody<Bytes, hyper::Error> {
fn empty() -> BoxBody<Bytes, Error> {
Empty::<Bytes>::new()
.map_err(|never| match never {})
.boxed()