File tree Expand file tree Collapse file tree 2 files changed +12
-17
lines changed
Expand file tree Collapse file tree 2 files changed +12
-17
lines changed Original file line number Diff line number Diff line change @@ -168,21 +168,17 @@ fn execute(
168168}
169169
170170fn bytes_from_os_string ( input : & OsStr ) -> Option < & [ u8 ] > {
171- let option = {
172- #[ cfg( target_family = "unix" ) ]
173- {
174- use std:: os:: unix:: ffi:: OsStrExt ;
171+ #[ cfg( target_family = "unix" ) ]
172+ {
173+ use std:: os:: unix:: ffi:: OsStrExt ;
175174
176- Some ( input. as_bytes ( ) )
177- }
178-
179- #[ cfg( not( target_family = "unix" ) ) ]
180- {
181- // TODO
182- // Verify that this works correctly on these platforms
183- input. to_str ( ) . map ( |st| st. as_bytes ( ) )
184- }
185- } ;
175+ Some ( input. as_bytes ( ) )
176+ }
186177
187- option
178+ #[ cfg( not( target_family = "unix" ) ) ]
179+ {
180+ // TODO
181+ // Verify that this works correctly on these platforms
182+ input. to_str ( ) . map ( |st| st. as_bytes ( ) )
183+ }
188184}
Original file line number Diff line number Diff line change @@ -283,8 +283,7 @@ impl<'a> NativeStr<'a> {
283283 match & self . native {
284284 Cow :: Borrowed ( b) => {
285285 let slice = f_borrow ( b) ;
286- let os_str = slice. map ( |x| from_native_int_representation ( Cow :: Borrowed ( x) ) ) ;
287- os_str
286+ slice. map ( |x| from_native_int_representation ( Cow :: Borrowed ( x) ) )
288287 }
289288 Cow :: Owned ( o) => {
290289 let slice = f_owned ( o) ;
You can’t perform that action at this time.
0 commit comments