We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 27b864b + 6dffd2d commit 28ab318Copy full SHA for 28ab318
library/std/src/path.rs
@@ -2060,8 +2060,9 @@ impl Path {
2060
/// assert_eq!(path.strip_prefix("/test/"), Ok(Path::new("haha/foo.txt")));
2061
/// assert_eq!(path.strip_prefix("/test/haha/foo.txt"), Ok(Path::new("")));
2062
/// assert_eq!(path.strip_prefix("/test/haha/foo.txt/"), Ok(Path::new("")));
2063
- /// assert_eq!(path.strip_prefix("test").is_ok(), false);
2064
- /// assert_eq!(path.strip_prefix("/haha").is_ok(), false);
+ ///
+ /// assert!(path.strip_prefix("test").is_err());
2065
+ /// assert!(path.strip_prefix("/haha").is_err());
2066
///
2067
/// let prefix = PathBuf::from("/test/");
2068
/// assert_eq!(path.strip_prefix(prefix), Ok(Path::new("haha/foo.txt")));
0 commit comments