Skip to content

Commit f608b91

Browse files
Apply suggestions from code review
Co-authored-by: Jubilee <46493976+workingjubilee@users.noreply.github.com>
1 parent 881ddba commit f608b91

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

library/std/src/path.rs

-6
Original file line numberDiff line numberDiff line change
@@ -1169,7 +1169,6 @@ impl FusedIterator for Ancestors<'_> {}
11691169
/// path.push(r"..\otherdir");
11701170
/// path.push("system32");
11711171
///
1172-
/// path.set_extension(r"\..\temp");
11731172
#[cfg_attr(not(test), rustc_diagnostic_item = "PathBuf")]
11741173
#[stable(feature = "rust1", since = "1.0.0")]
11751174
pub struct PathBuf {
@@ -1456,8 +1455,6 @@ impl PathBuf {
14561455
/// If the file stem contains internal dots and `extension` is empty, part
14571456
/// of the old file stem will be considered the new [`self.extension`].
14581457
///
1459-
/// The new `extension` is not sanitized, so may include separators.
1460-
///
14611458
/// See the examples below.
14621459
///
14631460
/// [`self.file_name`]: Path::file_name
@@ -1487,9 +1484,6 @@ impl PathBuf {
14871484
///
14881485
/// p.set_extension("");
14891486
/// assert_eq!(Path::new("/feel/the"), p.as_path());
1490-
///
1491-
/// p.set_extension("/darkest.cookie");
1492-
/// assert_eq!(Path::new("/feel/the./darkest.cookie"), p.as_path());
14931487
/// ```
14941488
#[stable(feature = "rust1", since = "1.0.0")]
14951489
pub fn set_extension<S: AsRef<OsStr>>(&mut self, extension: S) -> bool {

0 commit comments

Comments
 (0)