add example of joining with a absolute path
This commit is contained in:
parent
ec3da87582
commit
d8f8adfe3d
1 changed files with 1 additions and 0 deletions
|
|
@ -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]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue