File tree Expand file tree Collapse file tree 4 files changed +1
-20
lines changed
branches/dist-snap/src/libstd/path Expand file tree Collapse file tree 4 files changed +1
-20
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ refs/heads/try: c274a6888410ce3e357e014568b43310ed787d36
6
6
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
7
7
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8
8
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
9
- refs/heads/dist-snap: 0c7e8f7a92318d19fd9de96ba70fa36fc41de1e2
9
+ refs/heads/dist-snap: 40b324f0dec364a9fa71f9f8b47b8ab156f6d61e
10
10
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
11
11
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
12
12
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
Original file line number Diff line number Diff line change @@ -179,9 +179,6 @@ pub trait GenericPath: Clone + GenericPathUnsafe {
179
179
str:: from_utf8_slice_opt ( self . as_vec ( ) )
180
180
}
181
181
182
- /// Converts the Path into an owned string, if possible
183
- fn into_str ( self ) -> Option < ~str > ;
184
-
185
182
/// Returns the path as a byte vector
186
183
fn as_vec < ' a > ( & ' a self ) -> & ' a [ u8 ] ;
187
184
Original file line number Diff line number Diff line change @@ -178,10 +178,6 @@ impl GenericPath for Path {
178
178
self . repr
179
179
}
180
180
181
- fn into_str ( self ) -> Option < ~str > {
182
- str:: from_utf8_owned_opt ( self . repr )
183
- }
184
-
185
181
fn dirname < ' a > ( & ' a self ) -> & ' a [ u8 ] {
186
182
match self . sepidx {
187
183
None if bytes ! ( ".." ) == self . repr => self . repr . as_slice ( ) ,
@@ -614,12 +610,9 @@ mod tests {
614
610
assert_eq ! ( Path :: new( b!( "foo/bar" ) ) . into_vec( ) , b!( "foo/bar" ) . to_owned( ) ) ;
615
611
assert_eq ! ( Path :: new( b!( "/foo/../../bar" ) ) . into_vec( ) ,
616
612
b!( "/bar" ) . to_owned( ) ) ;
617
- assert_eq ! ( Path :: new( "foo/bar" ) . into_str( ) , Some ( ~"foo/bar"));
618
- assert_eq!(Path::new(" /foo/../../bar").into_str(), Some(~" /bar"));
619
613
620
614
let p = Path :: new ( b ! ( "foo/bar" , 0x80 ) ) ;
621
615
assert_eq ! ( p. as_str( ) , None ) ;
622
- assert_eq!(Path::new(b!(" foo", 0xff, " /bar")).into_str(), None);
623
616
}
624
617
625
618
#[ test]
Original file line number Diff line number Diff line change @@ -327,13 +327,6 @@ impl GenericPath for Path {
327
327
Some ( self . repr . as_slice ( ) )
328
328
}
329
329
330
- /// See `GenericPath::into_str` for info.
331
- /// Always returns a `Some` value.
332
- #[ inline]
333
- fn into_str ( self ) -> Option < ~str > {
334
- Some ( self . repr )
335
- }
336
-
337
330
#[ inline]
338
331
fn as_vec < ' a > ( & ' a self ) -> & ' a [ u8 ] {
339
332
self . repr . as_bytes ( )
@@ -1260,8 +1253,6 @@ mod tests {
1260
1253
assert_eq ! ( Path :: new( b!( "foo\\ bar" ) ) . into_vec( ) , b!( "foo\\ bar" ) . to_owned( ) ) ;
1261
1254
assert_eq ! ( Path :: new( b!( "\\ foo\\ ..\\ ..\\ bar" ) ) . into_vec( ) ,
1262
1255
b!( "\\ bar" ) . to_owned( ) ) ;
1263
- assert_eq ! ( Path :: new( "foo\\ bar" ) . into_str( ) , Some ( ~"foo\\ bar"));
1264
- assert_eq!(Path::new("\\ foo\\ ..\\ ..\\ bar" ) . into_str( ) , Some ( ~"\\ bar"));
1265
1256
1266
1257
t ! ( s: Path :: new( "\\ \\ a" ) , "\\ a" ) ;
1267
1258
t ! ( s: Path :: new( "\\ \\ a\\ " ) , "\\ a" ) ;
You can’t perform that action at this time.
0 commit comments