Skip to content

Commit d9bcb91

Browse files
committed
---
yaml --- r: 57710 b: refs/heads/incoming c: 2c5afa4 h: refs/heads/master v: v3
1 parent a92fce9 commit d9bcb91

File tree

3 files changed

+15
-5
lines changed

3 files changed

+15
-5
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ refs/heads/try: bf67eb2362b7d0f37012f2d6dac604c3bbacd2c6
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
9-
refs/heads/incoming: aee2567eca278c0632de09138977aa13ad0f46fd
9+
refs/heads/incoming: 2c5afa4753a7a5b525be83e42a767cf556103faa
1010
refs/heads/dist-snap: 00dbbd01c2aee72982b3e0f9511ae1d4428c3ba9
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/incoming/src/libcore/cell.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Similar to a mutable option type, but friendlier.
2020
*/
2121

2222
pub struct Cell<T> {
23-
priv value: Option<T>
23+
value: Option<T>
2424
}
2525

2626
impl<T:cmp::Eq> cmp::Eq for Cell<T> {

branches/incoming/src/libcore/path.rs

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ pub trait GenericPath {
6767
fn is_restricted(&self) -> bool;
6868

6969
fn normalize(&self) -> Self;
70+
71+
fn is_absolute(&self) -> bool;
7072
}
7173

7274
#[cfg(windows)]
@@ -379,10 +381,11 @@ impl ToStr for PosixPath {
379381
// FIXME (#3227): when default methods in traits are working, de-duplicate
380382
// PosixPath and WindowsPath, most of their methods are common.
381383
impl GenericPath for PosixPath {
382-
383384
fn from_str(s: &str) -> PosixPath {
384385
let mut components = ~[];
385-
for str::each_split_nonempty(s, |c| c == '/') |s| { components.push(s.to_owned()) }
386+
for str::each_split_nonempty(s, |c| c == '/') |s| {
387+
components.push(s.to_owned())
388+
}
386389
let is_absolute = (s.len() != 0 && s[0] == '/' as u8);
387390
return PosixPath { is_absolute: is_absolute,
388391
components: components }
@@ -540,6 +543,10 @@ impl GenericPath for PosixPath {
540543
// ..self
541544
}
542545
}
546+
547+
fn is_absolute(&self) -> bool {
548+
self.is_absolute
549+
}
543550
}
544551

545552

@@ -563,7 +570,6 @@ impl ToStr for WindowsPath {
563570

564571

565572
impl GenericPath for WindowsPath {
566-
567573
fn from_str(s: &str) -> WindowsPath {
568574
let host;
569575
let device;
@@ -809,6 +815,10 @@ impl GenericPath for WindowsPath {
809815
components: normalize(self.components)
810816
}
811817
}
818+
819+
fn is_absolute(&self) -> bool {
820+
self.is_absolute
821+
}
812822
}
813823

814824

0 commit comments

Comments
 (0)