diff --git a/contrib/lib/tests/static_files.rs b/contrib/lib/tests/static_files.rs index ebc93ece..4b9b33ec 100644 --- a/contrib/lib/tests/static_files.rs +++ b/contrib/lib/tests/static_files.rs @@ -47,7 +47,7 @@ mod static_tests { ]; fn assert_file(client: &Client, prefix: &str, path: &str, exists: bool) { - let full_path = format!("/{}", Path::new(prefix).join(path).display()); + let full_path = format!("/{}/{}", prefix, path); let mut response = client.get(full_path).dispatch(); if exists { assert_eq!(response.status(), Status::Ok); diff --git a/core/http/src/ext.rs b/core/http/src/ext.rs index a37797e9..8f0ae7db 100644 --- a/core/http/src/ext.rs +++ b/core/http/src/ext.rs @@ -109,7 +109,7 @@ pub trait Normalize { impl> Normalize for T { #[cfg(windows)] - fn normalized_str(&self) -> Cow { + fn normalized_str(&self) -> Cow<'_, str> { self.as_ref().to_string_lossy().replace('\\', "/").into() } diff --git a/core/lib/src/config/config.rs b/core/lib/src/config/config.rs index a40fe67c..690ba1fc 100644 --- a/core/lib/src/config/config.rs +++ b/core/lib/src/config/config.rs @@ -331,8 +331,6 @@ impl Config { /// /// # #[cfg(not(windows))] /// assert_eq!(config.root().unwrap(), Path::new("/var/my_app")); - /// # #[cfg(windows)] - /// assert_eq!(config.root().unwrap(), Path::new("C:\\var\\my_app")); /// ``` pub fn set_root>(&mut self, path: P) { self.root_path = Some(path.as_ref().into()); diff --git a/examples/static_files/static/rocket-icon.jpg b/examples/static_files/static/rocket-icon.jpg index b6000fb0..405f1a40 100644 Binary files a/examples/static_files/static/rocket-icon.jpg and b/examples/static_files/static/rocket-icon.jpg differ diff --git a/examples/todo/static/images/favicon.png b/examples/todo/static/images/favicon.png index 7a3c81c1..02b73904 100644 Binary files a/examples/todo/static/images/favicon.png and b/examples/todo/static/images/favicon.png differ