1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-07-01 16:55:08 +02:00

address clippy lints

This commit is contained in:
Rob Ede
2021-01-07 01:13:46 +00:00
parent 6d710629af
commit dc23559f23
4 changed files with 24 additions and 20 deletions

View File

@ -416,9 +416,9 @@ impl<B> ServiceResponse<B> {
}
}
impl<B> Into<Response<B>> for ServiceResponse<B> {
fn into(self) -> Response<B> {
self.response
impl<B> From<ServiceResponse<B>> for Response<B> {
fn into(res: ServiceResponse<B>) -> Response<B> {
res.response
}
}

View File

@ -121,13 +121,13 @@ pub enum EitherExtractError<A, B> {
Extract(A, B),
}
impl<A, B> Into<Error> for EitherExtractError<A, B>
impl<A, B> From<EitherExtractError<A, B>> for Error
where
A: Into<Error>,
B: Into<Error>,
{
fn into(self) -> Error {
match self {
fn into(err: EitherExtractError<A, B>) -> Error {
match err {
EitherExtractError::Bytes(err) => err,
EitherExtractError::Extract(a_err, _b_err) => a_err.into(),
}