From 2fb6d00b24403ee572b7b4c150660afd6ff5f80f Mon Sep 17 00:00:00 2001 From: Jeb Rosen Date: Sun, 19 Jul 2020 09:24:20 -0700 Subject: [PATCH] Note '/static' is absolute in 'StaticFiles' docs. --- contrib/lib/src/serve.rs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/contrib/lib/src/serve.rs b/contrib/lib/src/serve.rs index d0fc2c53..14707b74 100644 --- a/contrib/lib/src/serve.rs +++ b/contrib/lib/src/serve.rs @@ -126,7 +126,7 @@ impl std::ops::BitOr for Options { /// /// # Example /// -/// To serve files from the `/static` local file system directory at the +/// To serve files from the `/static` directory on the local file system at the /// `/public` path, allowing `index.html` files to be used to respond to /// requests for a directory (the default), you might write the following: /// @@ -142,16 +142,16 @@ impl std::ops::BitOr for Options { /// ``` /// /// With this, requests for files at `/public/` will be handled by -/// returning the contents of `./static/`. Requests for _directories_ at +/// returning the contents of `/static/`. Requests for _directories_ at /// `/public/` will be handled by returning the contents of -/// `./static//index.html`. +/// `/static//index.html`. /// -/// If your static files are stored relative to your crate and your project is -/// managed by Cargo, you should either use a relative path and ensure that your -/// server is started in the crate's root directory or use the -/// `CARGO_MANIFEST_DIR` to create an absolute path relative to your crate root. -/// For example, to serve files in the `static` subdirectory of your crate at -/// `/`, you might write: +/// `/static` is an absolute path. If your static files are stored relative to +/// your crate and your project is managed by Cargo, you should either use a +/// relative path and ensure that your server is started in the crate's root +/// directory or use the `CARGO_MANIFEST_DIR` environment variable to create an +/// absolute path relative to your crate root. For example, to serve files in +/// the `static` subdirectory of your crate at `/`, you might write: /// /// ```rust,no_run /// # extern crate rocket;