Skip to content

Commit f82c984

Browse files
committed
Update Path::strip_prefix doc
1 parent b54770c commit f82c984

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/libstd/path.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1582,8 +1582,10 @@ impl Path {
15821582

15831583
/// Returns a path that, when joined onto `base`, yields `self`.
15841584
///
1585+
/// # Errors
1586+
///
15851587
/// If `base` is not a prefix of `self` (i.e. `starts_with`
1586-
/// returns false), then `relative_from` returns `None`.
1588+
/// returns `false`), returns `Err`.
15871589
#[stable(since = "1.7.0", feature = "path_strip_prefix")]
15881590
pub fn strip_prefix<'a, P: ?Sized>(&'a self, base: &'a P)
15891591
-> Result<&'a Path, StripPrefixError>

0 commit comments

Comments
 (0)