Realistic Path::as_mut_os_str doctest

This commit is contained in:
Andres Suarez 2022-12-16 16:50:43 -05:00
parent 9c07efe84f
commit c68d2e4b87

View File

@ -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]