Skip to content

Commit 945c85f

Browse files
committed
---
yaml --- r: 55743 b: refs/heads/master c: 2c5afa4 h: refs/heads/master i: 55741: 573f304 55739: 205092e 55735: f3f5ef5 55727: 81a2822 55711: 05f9437 55679: 8ce5392 v: v3
1 parent 9e2de1f commit 945c85f

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
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: aee2567eca278c0632de09138977aa13ad0f46fd
2+
refs/heads/master: 2c5afa4753a7a5b525be83e42a767cf556103faa
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 79a2b2eafc3c766cecec8a5f76317693bae9ed17
55
refs/heads/try: 8eb2bab100b42f0ba751552d8eff00eb2134c55a

trunk/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> {

trunk/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)