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