From a649b4111f1a670d718db3f70e1ea64bd5b68215 Mon Sep 17 00:00:00 2001 From: Keita Nonaka Date: Sat, 15 May 2021 04:27:17 +0900 Subject: [PATCH] fix errors --- actix-files/src/files.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/actix-files/src/files.rs b/actix-files/src/files.rs index a844dc2c1..fc8fd2531 100644 --- a/actix-files/src/files.rs +++ b/actix-files/src/files.rs @@ -199,7 +199,7 @@ impl Files { /// ); /// ``` pub fn guard(mut self, guard: G) -> Self { - self.guards.push(Box::new(Rc::new(guard))); + self.guards.push(Rc::new(guard)); self } @@ -276,7 +276,7 @@ impl HttpServiceFactory for Files { Some( guards .into_iter() - .map(|guard| -> Box { guard }) + .map(|guard| -> Box { Box::new(guard) }) .collect::>(), ) };