Skip to content

Commit

Permalink
add example of joining with a absolute path
Browse files Browse the repository at this point in the history
  • Loading branch information
Erk- committed Jan 20, 2023
1 parent ec3da87 commit d8f8adf
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions library/std/src/path.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2541,6 +2541,7 @@ impl Path {
/// use std::path::{Path, PathBuf};
///
/// assert_eq!(Path::new("/etc").join("passwd"), PathBuf::from("/etc/passwd"));
/// assert_eq!(Path::new("/etc").join("/bin/sh"), PathBuf::from("/bin/sh"));
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
#[must_use]
Expand Down

0 comments on commit d8f8adf

Please sign in to comment.