From 032afec8d8f475fe6da6d380642e49fd04f30f6c Mon Sep 17 00:00:00 2001 From: Douman Date: Sun, 24 Mar 2019 00:30:26 +0300 Subject: [PATCH] Correct custom NamedFile usage --- content/docs/static-files.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/docs/static-files.md b/content/docs/static-files.md index fcb3666..6f3d385 100644 --- a/content/docs/static-files.md +++ b/content/docs/static-files.md @@ -89,7 +89,7 @@ impl StaticFileConfig for MyConfig { } } -fn index(req: &HttpRequest) -> Result { +fn index(req: &HttpRequest) -> Result> { let path: PathBuf = req.match_info().query("tail")?; Ok(NamedFile::open_with_config(path, MyConfig)?) }