Clarify behavior of Path::relative_from
This commit is contained in:
parent
2625bf9ae4
commit
9ec9bc68fb
1 changed files with 3 additions and 0 deletions
|
|
@ -1243,6 +1243,9 @@ impl Path {
|
|||
}
|
||||
|
||||
/// Returns a path that, when joined onto `base`, yields `self`.
|
||||
///
|
||||
/// If `base` is not a prefix of `self` (i.e. `starts_with`
|
||||
/// returns false), then `relative_from` returns `None`.
|
||||
#[unstable(feature = "path_relative_from", reason = "see #23284")]
|
||||
pub fn relative_from<'a, P: ?Sized>(&'a self, base: &'a P) -> Option<&Path> where
|
||||
P: AsPath
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue