Skip to content

Commit d1733cf

Browse files
author
Ulrik Sverdrup
committed
---
yaml --- r: 216877 b: refs/heads/stable c: 02b8e4e h: refs/heads/master i: 216875: c8ed192 v: v3
1 parent 8b975d2 commit d1733cf

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,5 @@ refs/heads/tmp: 378a370ff2057afeb1eae86eb6e78c476866a4a6
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
3030
refs/tags/homu-tmp: a5286998df566e736b32f6795bfc3803bdaf453d
3131
refs/tags/1.0.0-beta: 8cbb92b53468ee2b0c2d3eeb8567005953d40828
32-
refs/heads/stable: 4e8afd65f93f1c351365c71f4461a2c6728f8287
32+
refs/heads/stable: 02b8e4e6cf6f3fc3a7d31f348fc82bafa0165e3a
3333
refs/tags/1.0.0: 55bd4f8ff2b323f317ae89e254ce87162d52a375

branches/stable/src/libstd/path.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1449,6 +1449,8 @@ impl Path {
14491449

14501450
/// Determines whether `base` is a prefix of `self`.
14511451
///
1452+
/// Only considers whole path components to match.
1453+
///
14521454
/// # Examples
14531455
///
14541456
/// ```
@@ -1457,6 +1459,8 @@ impl Path {
14571459
/// let path = Path::new("/etc/passwd");
14581460
///
14591461
/// assert!(path.starts_with("/etc"));
1462+
///
1463+
/// assert!(!path.starts_with("/e"));
14601464
/// ```
14611465
#[stable(feature = "rust1", since = "1.0.0")]
14621466
pub fn starts_with<P: AsRef<Path>>(&self, base: P) -> bool {
@@ -1465,6 +1469,8 @@ impl Path {
14651469

14661470
/// Determines whether `child` is a suffix of `self`.
14671471
///
1472+
/// Only considers whole path components to match.
1473+
///
14681474
/// # Examples
14691475
///
14701476
/// ```

0 commit comments

Comments
 (0)