mirror of
https://github.com/actix/actix-website
synced 2024-11-27 18:12:57 +01:00
Merge pull request #180 from vo9312/update-named-file
Update named file
This commit is contained in:
commit
10162d2576
@ -36,9 +36,10 @@ converted into an `HttpInternalServerError`:
|
||||
|
||||
```rust
|
||||
use std::io;
|
||||
use actix_files::NamedFile;
|
||||
|
||||
fn index(_req: HttpRequest) -> io::Result<fs::NamedFile> {
|
||||
Ok(fs::NamedFile::open("static/index.html")?)
|
||||
fn index(_req: HttpRequest) -> io::Result<NamedFile> {
|
||||
Ok(NamedFile::open("static/index.html")?)
|
||||
}
|
||||
```
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user