File tree Expand file tree Collapse file tree 2 files changed +12
-9
lines changed Expand file tree Collapse file tree 2 files changed +12
-9
lines changed Original file line number Diff line number Diff line change 234
234
#![ feature( const_fn) ]
235
235
#![ feature( core_float) ]
236
236
#![ feature( core_intrinsics) ]
237
+ #![ feature( convert) ]
237
238
#![ feature( decode_utf16) ]
238
239
#![ feature( drop_in_place) ]
239
240
#![ feature( dropck_parametricity) ]
Original file line number Diff line number Diff line change @@ -1147,15 +1147,6 @@ impl PathBuf {
1147
1147
self . inner
1148
1148
}
1149
1149
1150
- /// Checks if the path buffer is empty. On Windows, it will return false if the inner string is
1151
- /// invalid unicode. On Unix, this is a no-op.
1152
- pub fn is_empty ( & self ) -> bool {
1153
- if let Some ( b) = self . inner . to_bytes ( ) {
1154
- b. is_empty ( )
1155
- } else {
1156
- true
1157
- }
1158
- }
1159
1150
}
1160
1151
1161
1152
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
@@ -1869,6 +1860,17 @@ impl Path {
1869
1860
pub fn is_dir ( & self ) -> bool {
1870
1861
fs:: metadata ( self ) . map ( |m| m. is_dir ( ) ) . unwrap_or ( false )
1871
1862
}
1863
+
1864
+ /// Checks if the path buffer is empty. On Windows, it will return false if the inner string is
1865
+ /// invalid unicode. On Unix, this is a no-op.
1866
+ #[ unstable( feature = "path_extras" , reason = "recently added" , issue = "30259" ) ]
1867
+ pub fn is_empty ( & self ) -> bool {
1868
+ if let Some ( b) = self . inner . to_bytes ( ) {
1869
+ b. is_empty ( )
1870
+ } else {
1871
+ true
1872
+ }
1873
+ }
1872
1874
}
1873
1875
1874
1876
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
You can’t perform that action at this time.
0 commit comments