fix errors

This commit is contained in:
Keita Nonaka 2021-05-15 04:27:17 +09:00
parent b80e9579ac
commit a649b4111f
1 changed files with 2 additions and 2 deletions

View File

@ -199,7 +199,7 @@ impl Files {
/// ); /// );
/// ``` /// ```
pub fn guard<G: Guard + 'static>(mut self, guard: G) -> Self { pub fn guard<G: Guard + 'static>(mut self, guard: G) -> Self {
self.guards.push(Box::new(Rc::new(guard))); self.guards.push(Rc::new(guard));
self self
} }
@ -276,7 +276,7 @@ impl HttpServiceFactory for Files {
Some( Some(
guards guards
.into_iter() .into_iter()
.map(|guard| -> Box<dyn Guard> { guard }) .map(|guard| -> Box<dyn Guard> { Box::new(guard) })
.collect::<Vec<_>>(), .collect::<Vec<_>>(),
) )
}; };