Skip to content

Commit 7a3bd73

Browse files
committed
---
yaml --- r: 68458 b: refs/heads/auto c: d600601 h: refs/heads/master v: v3
1 parent 4ae3651 commit 7a3bd73

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
1414
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1515
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1616
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
17-
refs/heads/auto: 8f5cb92f89a48fd47b0eff6fa72aa2f0b18188b3
17+
refs/heads/auto: d600601162d8a28b0a7e4eeaba81d0c2cee2e226
1818
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1919
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c

branches/auto/src/libstd/path.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -508,6 +508,14 @@ impl WindowsPath {
508508
}
509509
}
510510
}
511+
512+
/// Execute a function on p as well as all of its ancestors
513+
pub fn each_parent(&self, f: &fn(&Path)) {
514+
if !self.components.is_empty() {
515+
f(self);
516+
self.pop().each_parent(f);
517+
}
518+
}
511519
}
512520

513521
impl ToStr for PosixPath {

0 commit comments

Comments
 (0)