diff --git a/actix-files/src/named.rs b/actix-files/src/named.rs index bff585761..914385c43 100644 --- a/actix-files/src/named.rs +++ b/actix-files/src/named.rs @@ -195,9 +195,9 @@ impl NamedFile { // SAFETY: fd is borrowed and lives longer than the unsafe block. unsafe { let fs = std::fs::File::from_raw_fd(fd); - let md = fs.metadata()?; + let res = fs.metadata(); std::mem::forget(fs); - md + res? } } }; diff --git a/actix-files/src/service.rs b/actix-files/src/service.rs index 5ce300b38..1215ef23f 100644 --- a/actix-files/src/service.rs +++ b/actix-files/src/service.rs @@ -96,7 +96,7 @@ impl fmt::Debug for FilesService { impl Service for FilesService { type Response = ServiceResponse; type Error = Error; - type Future = LocalBoxFuture<'static, Result>; + type Future = LocalBoxFuture<'static, Result>; actix_service::always_ready!();