From 40a7ddad855d31bbc4a154e8bd8343de80f2697e Mon Sep 17 00:00:00 2001 From: Rob Ede Date: Tue, 6 Feb 2024 14:49:02 +0000 Subject: [PATCH] docs: clearer use of actix_web::Result --- examples/static-files/src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/static-files/src/main.rs b/examples/static-files/src/main.rs index 70557ee..3ec3834 100644 --- a/examples/static-files/src/main.rs +++ b/examples/static-files/src/main.rs @@ -4,10 +4,10 @@ pub mod directory; // use actix_files::NamedFile; -use actix_web::{HttpRequest, Result}; +use actix_web::HttpRequest; use std::path::PathBuf; -async fn index(req: HttpRequest) -> Result { +async fn index(req: HttpRequest) -> actix_web::Result { let path: PathBuf = req.match_info().query("filename").parse().unwrap(); Ok(NamedFile::open(path)?) }