Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Jubilee <46493976+workingjubilee@users.noreply.github.com>
  • Loading branch information
ChrisJefferson and workingjubilee authored Jun 3, 2024
1 parent 881ddba commit f608b91
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions library/std/src/path.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1169,7 +1169,6 @@ impl FusedIterator for Ancestors<'_> {}
/// path.push(r"..\otherdir");
/// path.push("system32");
///
/// path.set_extension(r"\..\temp");
#[cfg_attr(not(test), rustc_diagnostic_item = "PathBuf")]
#[stable(feature = "rust1", since = "1.0.0")]
pub struct PathBuf {
Expand Down Expand Up @@ -1456,8 +1455,6 @@ impl PathBuf {
/// If the file stem contains internal dots and `extension` is empty, part
/// of the old file stem will be considered the new [`self.extension`].
///
/// The new `extension` is not sanitized, so may include separators.
///
/// See the examples below.
///
/// [`self.file_name`]: Path::file_name
Expand Down Expand Up @@ -1487,9 +1484,6 @@ impl PathBuf {
///
/// p.set_extension("");
/// assert_eq!(Path::new("/feel/the"), p.as_path());
///
/// p.set_extension("/darkest.cookie");
/// assert_eq!(Path::new("/feel/the./darkest.cookie"), p.as_path());
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
pub fn set_extension<S: AsRef<OsStr>>(&mut self, extension: S) -> bool {
Expand Down

0 comments on commit f608b91

Please sign in to comment.