diff --git a/actix-files/src/named.rs b/actix-files/src/named.rs index 10015b80d..a0f73e99c 100644 --- a/actix-files/src/named.rs +++ b/actix-files/src/named.rs @@ -66,7 +66,7 @@ impl Default for Flags { /// /// #[get("/")] /// async fn index() -> impl Responder { -/// NamedFile::open("./static/index.html") +/// NamedFile::open_async("./static/index.html").await /// } /// ``` pub struct NamedFile { @@ -275,8 +275,8 @@ impl NamedFile { /// # use std::io; /// use actix_files::NamedFile; /// - /// # fn path() -> io::Result<()> { - /// let file = NamedFile::open("test.txt")?; + /// # async fn path() -> io::Result<()> { + /// let file = NamedFile::open_async("test.txt").await?; /// assert_eq!(file.path().as_os_str(), "foo.txt"); /// # Ok(()) /// # }