Skip to content

Commit

Permalink
Rename Error to ErrorResponse
Browse files Browse the repository at this point in the history
  • Loading branch information
davidpdrsn authored and npmccallum committed Apr 20, 2022
1 parent 400cdc3 commit 8a9d738
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions axum-core/src/response/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ pub type Response<T = BoxBody> = http::Response<T>;
/// Ok("ok")
/// }
/// ```
pub type Result<T, E = Error> = std::result::Result<T, E>;
pub type Result<T> = std::result::Result<T, ErrorResponse>;

impl<T> IntoResponse for Result<T>
where
Expand All @@ -60,9 +60,9 @@ where
///
/// See [Result] for more details.
#[derive(Debug)]
pub struct Error(Response);
pub struct ErrorResponse(Response);

impl<T> From<T> for Error
impl<T> From<T> for ErrorResponse
where
T: IntoResponse,
{
Expand Down
2 changes: 1 addition & 1 deletion axum/src/response/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ pub use crate::Extension;

#[doc(inline)]
pub use axum_core::response::{
AppendHeaders, Error, IntoResponse, IntoResponseParts, Response, ResponseParts, Result,
AppendHeaders, ErrorResponse, IntoResponse, IntoResponseParts, Response, ResponseParts, Result,
};

#[doc(inline)]
Expand Down

0 comments on commit 8a9d738

Please sign in to comment.