mirror of https://github.com/fafhrd91/actix-web
fix errors
This commit is contained in:
parent
b80e9579ac
commit
a649b4111f
|
@ -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<_>>(),
|
||||||
)
|
)
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue