File tree 1 file changed +3
-13
lines changed
1 file changed +3
-13
lines changed Original file line number Diff line number Diff line change @@ -327,14 +327,7 @@ unsafe fn u8_slice_as_os_str(s: &[u8]) -> &OsStr {
327
327
#[ inline]
328
328
#[ allow( unused_variables) ]
329
329
fn has_scheme ( s : & [ u8 ] ) -> bool {
330
- #[ cfg( target_os = "redox" ) ]
331
- {
332
- s. split ( |b| * b == b'/' ) . next ( ) . unwrap_or ( b"" ) . contains ( & b':' )
333
- }
334
- #[ cfg( not( target_os = "redox" ) ) ]
335
- {
336
- false
337
- }
330
+ cfg ! ( target_os = "redox" ) && s. split ( |b| * b == b'/' ) . next ( ) . unwrap_or ( b"" ) . contains ( & b':' )
338
331
}
339
332
340
333
////////////////////////////////////////////////////////////////////////////////
@@ -1702,12 +1695,9 @@ impl Path {
1702
1695
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
1703
1696
#[ allow( deprecated) ]
1704
1697
pub fn is_absolute ( & self ) -> bool {
1705
- #[ cfg( not( target_os = "redox" ) ) ]
1706
- {
1698
+ if !cfg ! ( target_os = "redox" ) {
1707
1699
self . has_root ( ) && ( cfg ! ( unix) || self . prefix ( ) . is_some ( ) )
1708
- }
1709
- #[ cfg( target_os = "redox" ) ]
1710
- {
1700
+ } else {
1711
1701
// FIXME: Allow Redox prefixes
1712
1702
has_scheme ( self . as_u8_slice ( ) )
1713
1703
}
You can’t perform that action at this time.
0 commit comments