Added a doc test for std::path::strip_prefix
This commit is contained in:
parent
f5d1857685
commit
f3ad32b769
1 changed files with 1 additions and 0 deletions
|
@ -2504,6 +2504,7 @@ impl Path {
|
||||||
/// assert_eq!(path.strip_prefix("/test/haha/foo.txt/"), Ok(Path::new("")));
|
/// assert_eq!(path.strip_prefix("/test/haha/foo.txt/"), Ok(Path::new("")));
|
||||||
///
|
///
|
||||||
/// assert!(path.strip_prefix("test").is_err());
|
/// assert!(path.strip_prefix("test").is_err());
|
||||||
|
/// assert!(path.strip_prefix("/te").is_err());
|
||||||
/// assert!(path.strip_prefix("/haha").is_err());
|
/// assert!(path.strip_prefix("/haha").is_err());
|
||||||
///
|
///
|
||||||
/// let prefix = PathBuf::from("/test/");
|
/// let prefix = PathBuf::from("/test/");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue