diff options
| author | Crom (Thibaut CHARLES) <CromFr@gmail.com> | 2024-11-24 14:36:55 +0100 |
|---|---|---|
| committer | Crom (Thibaut CHARLES) <CromFr@gmail.com> | 2024-11-24 14:37:40 +0100 |
| commit | f3ad32b76934fcc8a5119ecf20c7ba9cc7b40ea9 (patch) | |
| tree | bd9d15ee916c9dcc094b50717aa570dcd2575b03 | |
| parent | f5d18576856ef45d1e47de79889ae7db9d1afa29 (diff) | |
| download | rust-f3ad32b76934fcc8a5119ecf20c7ba9cc7b40ea9.tar.gz rust-f3ad32b76934fcc8a5119ecf20c7ba9cc7b40ea9.zip | |
Added a doc test for std::path::strip_prefix
| -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 b0291e3aa19..7ffb11b6aed 100644 --- a/library/std/src/path.rs +++ b/library/std/src/path.rs @@ -2504,6 +2504,7 @@ impl Path { /// assert_eq!(path.strip_prefix("/test/haha/foo.txt/"), Ok(Path::new(""))); /// /// assert!(path.strip_prefix("test").is_err()); + /// assert!(path.strip_prefix("/te").is_err()); /// assert!(path.strip_prefix("/haha").is_err()); /// /// let prefix = PathBuf::from("/test/"); |
