From df4ab1b7cbac51010862fed23fd9994867ffae67 Mon Sep 17 00:00:00 2001 From: vo9312 Date: Fri, 26 Jun 2020 11:49:01 -0500 Subject: [PATCH] Update errors.md --- content/docs/errors.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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")?) } ```