1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-08-21 21:25:36 +02:00

clippy warnings

This commit is contained in:
Nikolay Kim
2018-04-29 09:09:08 -07:00
parent d98d723f97
commit c72d1381a6
62 changed files with 1742 additions and 818 deletions

View File

@@ -132,7 +132,10 @@ impl<S: 'static> ResourceHandler<S> {
/// ```
pub fn method(&mut self, method: Method) -> &mut Route<S> {
self.routes.push(Route::default());
self.routes.last_mut().unwrap().filter(pred::Method(method))
self.routes
.last_mut()
.unwrap()
.filter(pred::Method(method))
}
/// Register a new route and add handler object.
@@ -185,7 +188,9 @@ impl<S: 'static> ResourceHandler<S> {
/// This is similar to `App's` middlewares, but
/// middlewares get invoked on resource level.
pub fn middleware<M: Middleware<S>>(&mut self, mw: M) {
Rc::get_mut(&mut self.middlewares).unwrap().push(Box::new(mw));
Rc::get_mut(&mut self.middlewares)
.unwrap()
.push(Box::new(mw));
}
pub(crate) fn handle(