about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAndres Suarez <zertosh@gmail.com>2022-12-16 16:50:43 -0500
committerAndres Suarez <zertosh@gmail.com>2022-12-16 16:52:36 -0500
commitc68d2e4b879abc32d3fca6179d344d08dc1c73f6 (patch)
treed1e1994262926241235a8cfc9a711fe85737d176
parent9c07efe84f28a44f3044237696acc295aa407ee5 (diff)
downloadrust-c68d2e4b879abc32d3fca6179d344d08dc1c73f6.tar.gz
rust-c68d2e4b879abc32d3fca6179d344d08dc1c73f6.zip
Realistic `Path::as_mut_os_str` doctest
-rw-r--r--library/std/src/path.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/library/std/src/path.rs b/library/std/src/path.rs
index a835b855ddd..73b5056e932 100644
--- a/library/std/src/path.rs
+++ b/library/std/src/path.rs
@@ -2039,12 +2039,12 @@ impl Path {
     /// #![feature(path_as_mut_os_str)]
     /// use std::path::{Path, PathBuf};
     ///
-    /// let mut path = PathBuf::from("/Foo.TXT").into_boxed_path();
+    /// let mut path = PathBuf::from("Foo.TXT");
     ///
-    /// assert_ne!(&*path, Path::new("/foo.txt"));
+    /// assert_ne!(path, Path::new("foo.txt"));
     ///
     /// path.as_mut_os_str().make_ascii_lowercase();
-    /// assert_eq!(&*path, Path::new("/foo.txt"));
+    /// assert_eq!(path, Path::new("foo.txt"));
     /// ```
     #[unstable(feature = "path_as_mut_os_str", issue = "105021")]
     #[must_use]