File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -84,6 +84,7 @@ mod tests {
8484
8585 fn repo_init ( ) -> Result < ( TempDir , Repository ) > {
8686 const INVALID_UTF8 : & [ u8 ] = b"\xED \xA0 \x80 " ;
87+
8788 let mut os_string: OsString = OsString :: new ( ) ;
8889
8990 os_string. push ( "gitui $# ' " ) ;
@@ -92,14 +93,16 @@ mod tests {
9293 {
9394 use std:: os:: windows:: ffi:: OsStringExt ;
9495
95- const INVALID_UTF8 : & [ u16 ] =
96- INVALID_UTF8 . map ( |b| b as u16 ) ;
96+ let invalid_utf8 = INVALID_UTF8
97+ . into_iter ( )
98+ . map ( |b| b as u16 )
99+ . collect :: < Vec < u16 > > ( ) ;
97100
98- os_str . push ( OsString :: from_wide ( INVALID_UTF8 ) ) ;
101+ os_string . push ( OsString :: from_wide ( & invalid_utf8 ) ) ;
99102
100103 assert ! ( os_string. to_str( ) . is_none( ) ) ;
101104 }
102- #[ cfg( unix ) ]
105+ #[ cfg( target_os = "linux" ) ]
103106 {
104107 use std:: os:: unix:: ffi:: OsStrExt ;
105108
You can’t perform that action at this time.
0 commit comments