File tree Expand file tree Collapse file tree 2 files changed +13
-107
lines changed Expand file tree Collapse file tree 2 files changed +13
-107
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -245,14 +245,19 @@ impl<T> TArray<T> {
245
245
246
246
impl FString {
247
247
fn to_os_string ( & self ) -> OsString {
248
- use std:: os:: windows:: ffi:: OsStringExt ;
249
- let slice = self . as_slice ( ) ;
250
- let len = slice
251
- . iter ( )
252
- . enumerate ( )
253
- . find_map ( |( i, & b) | ( b == 0 ) . then_some ( i) )
254
- . unwrap_or ( slice. len ( ) ) ;
255
- std:: ffi:: OsString :: from_wide ( & slice[ 0 ..len] )
248
+ #[ cfg( target_os = "windows" ) ]
249
+ {
250
+ use std:: os:: windows:: ffi:: OsStringExt ;
251
+ let slice = self . as_slice ( ) ;
252
+ let len = slice
253
+ . iter ( )
254
+ . enumerate ( )
255
+ . find_map ( |( i, & b) | ( b == 0 ) . then_some ( i) )
256
+ . unwrap_or ( slice. len ( ) ) ;
257
+ std:: ffi:: OsString :: from_wide ( & slice[ 0 ..len] )
258
+ }
259
+ #[ cfg( not( target_os = "windows" ) ) ]
260
+ unimplemented ! ( )
256
261
}
257
262
}
258
263
You can’t perform that action at this time.
0 commit comments