Skip to content

Commit 06a9072

Browse files
committed
add example of joining with a absolute path
1 parent 7a565da commit 06a9072

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

std/src/path.rs

+1
Original file line numberDiff line numberDiff line change
@@ -2541,6 +2541,7 @@ impl Path {
25412541
/// use std::path::{Path, PathBuf};
25422542
///
25432543
/// assert_eq!(Path::new("/etc").join("passwd"), PathBuf::from("/etc/passwd"));
2544+
/// assert_eq!(Path::new("/etc").join("/bin/sh"), PathBuf::from("/bin/sh"));
25442545
/// ```
25452546
#[stable(feature = "rust1", since = "1.0.0")]
25462547
#[must_use]

0 commit comments

Comments
 (0)