diff options
| author | Gleb Kozyrev <gleb@gkoz.com> | 2016-02-17 20:13:59 +0200 |
|---|---|---|
| committer | Gleb Kozyrev <gleb@gkoz.com> | 2016-02-17 20:16:12 +0200 |
| commit | f82c984764c6f97dccac6a78b421954a64f3e6e0 (patch) | |
| tree | a9b975c0ac676f7842b45e91e283a47f75027c86 /src | |
| parent | b54770c24578311ad6cc782fcf1d0dc8cb41e997 (diff) | |
| download | rust-f82c984764c6f97dccac6a78b421954a64f3e6e0.tar.gz rust-f82c984764c6f97dccac6a78b421954a64f3e6e0.zip | |
Update `Path::strip_prefix` doc
Diffstat (limited to 'src')
| -rw-r--r-- | src/libstd/path.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libstd/path.rs b/src/libstd/path.rs index 10ecaed3aef..3798fb76ad6 100644 --- a/src/libstd/path.rs +++ b/src/libstd/path.rs @@ -1582,8 +1582,10 @@ impl Path { /// Returns a path that, when joined onto `base`, yields `self`. /// + /// # Errors + /// /// If `base` is not a prefix of `self` (i.e. `starts_with` - /// returns false), then `relative_from` returns `None`. + /// returns `false`), returns `Err`. #[stable(since = "1.7.0", feature = "path_strip_prefix")] pub fn strip_prefix<'a, P: ?Sized>(&'a self, base: &'a P) -> Result<&'a Path, StripPrefixError> |
