This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +0
-33
lines changed Expand file tree Collapse file tree 3 files changed +0
-33
lines changed Original file line number Diff line number Diff line change @@ -1222,23 +1222,6 @@ impl OsStr {
12221222 }
12231223}
12241224
1225- #[ unstable( feature = "slice_concat_ext" , issue = "27747" ) ]
1226- impl < S : Borrow < OsStr > > alloc:: slice:: Join < & OsStr > for [ S ] {
1227- type Output = OsString ;
1228-
1229- fn join ( slice : & Self , sep : & OsStr ) -> OsString {
1230- let Some ( first) = slice. first ( ) else {
1231- return OsString :: new ( ) ;
1232- } ;
1233- let first = first. borrow ( ) . to_owned ( ) ;
1234- slice[ 1 ..] . iter ( ) . fold ( first, |mut a, b| {
1235- a. push ( sep) ;
1236- a. push ( b. borrow ( ) ) ;
1237- a
1238- } )
1239- }
1240- }
1241-
12421225#[ stable( feature = "rust1" , since = "1.0.0" ) ]
12431226impl Borrow < OsStr > for OsString {
12441227 #[ inline]
Original file line number Diff line number Diff line change @@ -84,20 +84,6 @@ fn test_os_string_reserve_exact() {
8484 assert ! ( os_string. capacity( ) >= 33 )
8585}
8686
87- #[ test]
88- fn test_os_string_join ( ) {
89- let strings = [ OsStr :: new ( "hello" ) , OsStr :: new ( "dear" ) , OsStr :: new ( "world" ) ] ;
90- assert_eq ! ( "hello" , strings[ ..1 ] . join( OsStr :: new( " " ) ) ) ;
91- assert_eq ! ( "hello dear world" , strings. join( OsStr :: new( " " ) ) ) ;
92- assert_eq ! ( "hellodearworld" , strings. join( OsStr :: new( "" ) ) ) ;
93- assert_eq ! ( "hello.\n dear.\n world" , strings. join( OsStr :: new( ".\n " ) ) ) ;
94-
95- assert_eq ! ( "dear world" , strings[ 1 ..] . join( & OsString :: from( " " ) ) ) ;
96-
97- let strings_abc = [ OsString :: from ( "a" ) , OsString :: from ( "b" ) , OsString :: from ( "c" ) ] ;
98- assert_eq ! ( "a b c" , strings_abc. join( OsStr :: new( " " ) ) ) ;
99- }
100-
10187#[ test]
10288fn test_os_string_default ( ) {
10389 let os_string: OsString = Default :: default ( ) ;
Original file line number Diff line number Diff line change 241241#![ feature( intra_doc_pointers) ]
242242#![ feature( lang_items) ]
243243#![ feature( let_chains) ]
244- #![ feature( let_else) ]
245244#![ feature( linkage) ]
246245#![ feature( min_specialization) ]
247246#![ feature( must_not_suspend) ]
302301#![ feature( toowned_clone_into) ]
303302#![ feature( try_reserve_kind) ]
304303#![ feature( vec_into_raw_parts) ]
305- #![ feature( slice_concat_trait) ]
306304//
307305// Library features (unwind):
308306#![ feature( panic_unwind) ]
You can’t perform that action at this time.
0 commit comments