1
0
mirror of https://github.com/actix/actix-website synced 2025-08-20 04:45:37 +02:00

Merge pull request #180 from vo9312/update-named-file

Update named file
This commit is contained in:
Yuki Okushi
2020-07-03 07:41:58 +09:00
committed by GitHub

View File

@@ -36,9 +36,10 @@ converted into an `HttpInternalServerError`:
```rust ```rust
use std::io; use std::io;
use actix_files::NamedFile;
fn index(_req: HttpRequest) -> io::Result<fs::NamedFile> { fn index(_req: HttpRequest) -> io::Result<NamedFile> {
Ok(fs::NamedFile::open("static/index.html")?) Ok(NamedFile::open("static/index.html")?)
} }
``` ```