1
0
mirror of https://github.com/actix/actix-website synced 2024-11-30 19:14:36 +01:00

Correct custom NamedFile usage

This commit is contained in:
Douman 2019-03-24 00:30:26 +03:00
parent b15d1a1437
commit 032afec8d8

View File

@ -89,7 +89,7 @@ impl StaticFileConfig for MyConfig {
} }
} }
fn index(req: &HttpRequest) -> Result<NamedFile> { fn index(req: &HttpRequest) -> Result<NamedFile<MyConfig>> {
let path: PathBuf = req.match_info().query("tail")?; let path: PathBuf = req.match_info().query("tail")?;
Ok(NamedFile::open_with_config(path, MyConfig)?) Ok(NamedFile::open_with_config(path, MyConfig)?)
} }