Skip to content

Commit 962d814

Browse files
committed
---
yaml --- r: 79406 b: refs/heads/snap-stage3 c: 59291eb h: refs/heads/master v: v3
1 parent 3e84358 commit 962d814

File tree

2 files changed

+13
-12
lines changed

2 files changed

+13
-12
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 124eb2119c78651cfaaa7a046a101fa2e20f83ca
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 8651011b6fffb7f95a354ce85eeb1d2aa4b476a5
4+
refs/heads/snap-stage3: 59291eb197fad9a0fe3e94afda826f3abf1761ab
55
refs/heads/try: ac820906c0e53eab79a98ee64f7231f57c3887b4
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/src/libstd/path.rs

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,10 @@ pub fn PosixPath(s: &str) -> PosixPath {
5858
}
5959

6060
pub trait GenericPath : Clone + Eq + ToStr {
61-
/// Converts a string to a Path
61+
/// Converts a string to a path.
6262
fn from_str(&str) -> Self;
6363

64-
/// Returns the directory component of `self`, as a string
64+
/// Returns the directory component of `self`, as a string.
6565
fn dirname(&self) -> ~str {
6666
let s = self.dir_path().to_str();
6767
match s.len() {
@@ -152,17 +152,17 @@ pub trait GenericPath : Clone + Eq + ToStr {
152152
/// If `self` names a directory, returns the empty path.
153153
fn file_path(&self) -> Self;
154154

155-
/// Returns a new Path whose parent directory is `self` and whose
155+
/// Returns a new path whose parent directory is `self` and whose
156156
/// file component is the given string.
157157
fn push(&self, (&str)) -> Self;
158158

159-
/// Returns a new Path consisting of the given path, made relative to `self`.
159+
/// Returns a new path consisting of the given path, made relative to `self`.
160160
fn push_rel(&self, other: &Self) -> Self {
161161
assert!(!other.is_absolute());
162162
self.push_many(other.components())
163163
}
164164

165-
/// Returns a new Path consisting of the path given by the given vector
165+
/// Returns a new path consisting of the path given by the given vector
166166
/// of strings, relative to `self`.
167167
fn push_many<S: Str>(&self, (&[S])) -> Self;
168168

@@ -174,9 +174,9 @@ pub trait GenericPath : Clone + Eq + ToStr {
174174
/// contain directory separators in any of its components.
175175
fn unsafe_join(&self, (&Self)) -> Self;
176176

177-
/// On Unix, always returns false. On Windows, returns true iff `self`'s
177+
/// On Unix, always returns `false`. On Windows, returns `true` iff `self`'s
178178
/// file stem is one of: `con` `aux` `com1` `com2` `com3` `com4`
179-
/// `lpt1` `lpt2` `lpt3` `prn` `nul`
179+
/// `lpt1` `lpt2` `lpt3` `prn` `nul`.
180180
fn is_restricted(&self) -> bool;
181181

182182
/// Returns a new path that names the same file as `self`, without containing
@@ -187,7 +187,8 @@ pub trait GenericPath : Clone + Eq + ToStr {
187187
/// Returns `true` if `self` is an absolute path.
188188
fn is_absolute(&self) -> bool;
189189

190-
/// True if `self` is an ancestor of `other`. See `test_is_ancestor_of` for examples
190+
/// True if `self` is an ancestor of `other`.
191+
// See `test_is_ancestor_of` for examples.
191192
fn is_ancestor_of(&self, other: &Self) -> bool {
192193
debug!("%s / %s %? %?", self.to_str(), other.to_str(), self.is_absolute(),
193194
self.components().len());
@@ -197,7 +198,7 @@ pub trait GenericPath : Clone + Eq + ToStr {
197198
self.is_ancestor_of(&other.pop()))
198199
}
199200

200-
/// Find the relative path from one file to another
201+
/// Finds the relative path from one file to another.
201202
fn get_relative_to(&self, abs2: (&Self)) -> Self {
202203
assert!(self.is_absolute());
203204
assert!(abs2.is_absolute());
@@ -516,7 +517,7 @@ impl PosixPath {
516517
}
517518
}
518519

519-
/// Execute a function on p as well as all of its ancestors
520+
/// Executes a function `f` on `self` as well as on all of its ancestors.
520521
pub fn each_parent(&self, f: &fn(&Path)) {
521522
if !self.components.is_empty() {
522523
f(self);
@@ -618,7 +619,7 @@ impl WindowsPath {
618619
}
619620
}
620621

621-
/// Execute a function on p as well as all of its ancestors
622+
/// Executes a function `f` on `self` as well as on all of its ancestors.
622623
pub fn each_parent(&self, f: &fn(&Path)) {
623624
if !self.components.is_empty() {
624625
f(self);

0 commit comments

Comments
 (0)