Removed E in ErrorHandlingExt
This commit is contained in:
parent
75afab933d
commit
2b12996453
@ -1,4 +1,4 @@
|
||||
use std::{borrow::Cow, convert::Infallible};
|
||||
use std::borrow::Cow;
|
||||
|
||||
use axum::{http::StatusCode, response::IntoResponse};
|
||||
|
||||
@ -43,7 +43,7 @@ impl IntoResponse for GeneralError {
|
||||
|
||||
pub type GeneralResult<T> = Result<T, GeneralError>;
|
||||
|
||||
pub trait ErrorHandlingExt<T, E>
|
||||
pub trait ErrorHandlingExt<T>
|
||||
where
|
||||
Self: Sized,
|
||||
{
|
||||
@ -58,7 +58,7 @@ where
|
||||
}
|
||||
}
|
||||
|
||||
impl<T, E: Into<BoxError>> ErrorHandlingExt<T, E> for Result<T, E> {
|
||||
impl<T, E: Into<BoxError>> ErrorHandlingExt<T> for Result<T, E> {
|
||||
fn handle(
|
||||
self,
|
||||
status_code: StatusCode,
|
||||
@ -72,7 +72,7 @@ impl<T, E: Into<BoxError>> ErrorHandlingExt<T, E> for Result<T, E> {
|
||||
}
|
||||
}
|
||||
|
||||
impl<T> ErrorHandlingExt<T, Infallible> for Option<T> {
|
||||
impl<T> ErrorHandlingExt<T> for Option<T> {
|
||||
fn handle(
|
||||
self,
|
||||
status_code: StatusCode,
|
||||
|
Reference in New Issue
Block a user