Skip to content

Commit fd70f6e

Browse files
committed
---
yaml --- r: 81603 b: refs/heads/snap-stage3 c: 3d80a2f h: refs/heads/master i: 81601: 0c8fb12 81599: c5d02f1 v: v3
1 parent 5049e56 commit fd70f6e

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
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: 4c6bf4872012c010f84dc7fa2cdfe87522533f89
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 6f5b809775fb1f8dbf27edded8e955d64377749c
4+
refs/heads/snap-stage3: 3d80a2f1f1910fd681b8fd99906da3446dc06a90
55
refs/heads/try: 70152ff55722878cde684ee6462c14c65f2c4729
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/src/libstd/path2/mod.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
use container::Container;
1414
use c_str::CString;
1515
use clone::Clone;
16-
use iterator::Iterator;
16+
use iter::Iterator;
1717
use option::{Option, None, Some};
1818
use str;
1919
use str::StrSlice;
@@ -102,7 +102,7 @@ pub trait GenericPath: Clone + GenericPathUnsafe {
102102
/// If the path is not representable in utf-8, this returns None.
103103
#[inline]
104104
fn as_str<'a>(&'a self) -> Option<&'a str> {
105-
str::from_bytes_slice_opt(self.as_vec())
105+
str::from_utf8_slice_opt(self.as_vec())
106106
}
107107

108108
/// Returns the path as a byte vector
@@ -115,7 +115,7 @@ pub trait GenericPath: Clone + GenericPathUnsafe {
115115
/// See `dirname` for details.
116116
#[inline]
117117
fn dirname_str<'a>(&'a self) -> Option<&'a str> {
118-
str::from_bytes_slice_opt(self.dirname())
118+
str::from_utf8_slice_opt(self.dirname())
119119
}
120120
/// Returns the file component of `self`, as a byte vector.
121121
/// If `self` represents the root of the file hierarchy, returns the empty vector.
@@ -125,7 +125,7 @@ pub trait GenericPath: Clone + GenericPathUnsafe {
125125
/// See `filename` for details.
126126
#[inline]
127127
fn filename_str<'a>(&'a self) -> Option<&'a str> {
128-
str::from_bytes_slice_opt(self.filename())
128+
str::from_utf8_slice_opt(self.filename())
129129
}
130130
/// Returns the stem of the filename of `self`, as a byte vector.
131131
/// The stem is the portion of the filename just before the last '.'.
@@ -143,7 +143,7 @@ pub trait GenericPath: Clone + GenericPathUnsafe {
143143
/// See `filestem` for details.
144144
#[inline]
145145
fn filestem_str<'a>(&'a self) -> Option<&'a str> {
146-
str::from_bytes_slice_opt(self.filestem())
146+
str::from_utf8_slice_opt(self.filestem())
147147
}
148148
/// Returns the extension of the filename of `self`, as an optional byte vector.
149149
/// The extension is the portion of the filename just after the last '.'.
@@ -162,7 +162,7 @@ pub trait GenericPath: Clone + GenericPathUnsafe {
162162
/// See `extension` for details.
163163
#[inline]
164164
fn extension_str<'a>(&'a self) -> Option<&'a str> {
165-
self.extension().chain(|v| str::from_bytes_slice_opt(v))
165+
self.extension().and_then(|v| str::from_utf8_slice_opt(v))
166166
}
167167

168168
/// Replaces the directory portion of the path with the given byte vector.
@@ -447,7 +447,7 @@ pub trait GenericPath: Clone + GenericPathUnsafe {
447447
/// See `pop_opt` for details.
448448
#[inline]
449449
fn pop_opt_str(&mut self) -> Option<~str> {
450-
self.pop_opt().chain(|v| str::from_bytes_owned_opt(v))
450+
self.pop_opt().and_then(|v| str::from_utf8_owned_opt(v))
451451
}
452452

453453
/// Returns a new Path constructed by joining `self` with the given path (as a byte vector).

branches/snap-stage3/src/libstd/path2/posix.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ use c_str::{CString, ToCStr};
1515
use clone::Clone;
1616
use cmp::Eq;
1717
use from_str::FromStr;
18-
use iterator::{AdditiveIterator, Extendable, Iterator};
18+
use iter::{AdditiveIterator, Extendable, Iterator};
1919
use option::{Option, None, Some};
2020
use str;
2121
use str::Str;
@@ -303,7 +303,7 @@ impl Path {
303303

304304
/// Converts the Path into an owned string, if possible
305305
pub fn into_str(self) -> Option<~str> {
306-
str::from_bytes_owned_opt(self.repr)
306+
str::from_utf8_owned_opt(self.repr)
307307
}
308308

309309
/// Returns a normalized byte vector representation of a path, by removing all empty
@@ -406,7 +406,7 @@ static dot_dot_static: &'static [u8] = &'static ['.' as u8, '.' as u8];
406406
mod tests {
407407
use super::*;
408408
use option::{Some, None};
409-
use iterator::Iterator;
409+
use iter::Iterator;
410410
use str;
411411
use vec::Vector;
412412

@@ -589,7 +589,7 @@ mod tests {
589589
(s: $path:expr, $op:ident, $exp:expr, opt) => (
590590
{
591591
let path = Path::from_str($path);
592-
let left = path.$op().map(|&x| str::from_bytes_slice(x));
592+
let left = path.$op().map(|&x| str::from_utf8_slice(x));
593593
assert_eq!(left, $exp);
594594
}
595595
);
@@ -1006,7 +1006,7 @@ mod tests {
10061006
(s: $path:expr, $exp:expr) => (
10071007
{
10081008
let path = $path;
1009-
let left = path.chain_ref(|p| p.as_str());
1009+
let left = path.and_then_ref(|p| p.as_str());
10101010
assert_eq!(left, $exp);
10111011
}
10121012
);
@@ -1083,7 +1083,7 @@ mod tests {
10831083
let path = Path::from_str($path);
10841084
let other = Path::from_str($other);
10851085
let res = path.path_relative_from(&other);
1086-
assert_eq!(res.chain_ref(|x| x.as_str()), $exp);
1086+
assert_eq!(res.and_then_ref(|x| x.as_str()), $exp);
10871087
}
10881088
)
10891089
)

0 commit comments

Comments
 (0)