Skip to content

Commit

Permalink
Added a doc test for std::path::strip_prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
CromFr authored and gitbot committed Feb 20, 2025
1 parent 78fc550 commit 726a134
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions std/src/path.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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/");
Expand Down

0 comments on commit 726a134

Please sign in to comment.