diff options
| author | Valdemar Erk <valdemar@erk.dev> | 2023-01-20 12:03:43 +0100 |
|---|---|---|
| committer | Valdemar Erk <valdemar@erk.dev> | 2023-01-20 12:03:43 +0100 |
| commit | d8f8adfe3df3cdc882db8ba7dfb9d7fcc8533b82 (patch) | |
| tree | f535e2be2a1ededd0482ba7585112ff7ebc8584e | |
| parent | ec3da87582a318ddb35d451bdba6d50591ea55ce (diff) | |
| download | rust-d8f8adfe3df3cdc882db8ba7dfb9d7fcc8533b82.tar.gz rust-d8f8adfe3df3cdc882db8ba7dfb9d7fcc8533b82.zip | |
add example of joining with a absolute path
| -rw-r--r-- | library/std/src/path.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/library/std/src/path.rs b/library/std/src/path.rs index 500a09ad08a..2f53cf83936 100644 --- a/library/std/src/path.rs +++ b/library/std/src/path.rs @@ -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] |
