diff --git a/content/docs/errors.md b/content/docs/errors.md index e39259e..72b5a25 100644 --- a/content/docs/errors.md +++ b/content/docs/errors.md @@ -36,9 +36,10 @@ converted into an `HttpInternalServerError`: ```rust use std::io; +use actix_files::NamedFile; -fn index(_req: HttpRequest) -> io::Result { - Ok(fs::NamedFile::open("static/index.html")?) +fn index(_req: HttpRequest) -> io::Result { + Ok(NamedFile::open("static/index.html")?) } ```