Removed E in ErrorHandlingExt

This commit is contained in:
StNicolay 2024-08-06 16:39:43 +03:00
parent 75afab933d
commit 2b12996453
Signed by: StNicolay
GPG Key ID: 9693D04DCD962B0D

View File

@ -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,