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.
1 parent d19d7e2 commit 6dffd2dCopy full SHA for 6dffd2d
library/std/src/path.rs
@@ -2053,8 +2053,9 @@ impl Path {
2053
/// assert_eq!(path.strip_prefix("/test/"), Ok(Path::new("haha/foo.txt")));
2054
/// assert_eq!(path.strip_prefix("/test/haha/foo.txt"), Ok(Path::new("")));
2055
/// assert_eq!(path.strip_prefix("/test/haha/foo.txt/"), Ok(Path::new("")));
2056
- /// assert_eq!(path.strip_prefix("test").is_ok(), false);
2057
- /// assert_eq!(path.strip_prefix("/haha").is_ok(), false);
+ ///
+ /// assert!(path.strip_prefix("test").is_err());
2058
+ /// assert!(path.strip_prefix("/haha").is_err());
2059
///
2060
/// let prefix = PathBuf::from("/test/");
2061
/// assert_eq!(path.strip_prefix(prefix), Ok(Path::new("haha/foo.txt")));
0 commit comments