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

nightly clippy warnings

This commit is contained in:
Nikolay Kim
2019-07-17 15:48:37 +06:00
parent 4092c7f326
commit 2a2d7f5768
34 changed files with 104 additions and 99 deletions

View File

@ -18,7 +18,7 @@ pub enum ErrorHandlerResponse<B> {
Future(Box<dyn Future<Item = ServiceResponse<B>, Error = Error>>),
}
type ErrorHandler<B> = Fn(ServiceResponse<B>) -> Result<ErrorHandlerResponse<B>>;
type ErrorHandler<B> = dyn Fn(ServiceResponse<B>) -> Result<ErrorHandlerResponse<B>>;
/// `Middleware` for allowing custom handlers for responses.
///

View File

@ -444,7 +444,9 @@ impl FormatText {
}
}
pub(crate) struct FormatDisplay<'a>(&'a Fn(&mut Formatter) -> Result<(), fmt::Error>);
pub(crate) struct FormatDisplay<'a>(
&'a dyn Fn(&mut Formatter) -> Result<(), fmt::Error>,
);
impl<'a> fmt::Display for FormatDisplay<'a> {
fn fmt(&self, fmt: &mut Formatter) -> Result<(), fmt::Error> {