File tree Expand file tree Collapse file tree 4 files changed +14
-15
lines changed
Expand file tree Collapse file tree 4 files changed +14
-15
lines changed Original file line number Diff line number Diff line change @@ -314,7 +314,7 @@ mod tests {
314314
315315 fn _check_all_strings_of_len ( len : usize , chunk : & mut Vec < u8 > ) {
316316 if len == 0 {
317- if let Ok ( s) = std :: str:: from_utf8 ( chunk) {
317+ if let Ok ( s) = core :: str:: from_utf8 ( chunk) {
318318 let old_matches: Vec < _ > = STRIP_ANSI_RE . find_iter ( s) . collect ( ) ;
319319 let new_matches: Vec < _ > = Matches :: new ( s) . collect ( ) ;
320320 assert_eq ! ( old_matches, new_matches) ;
Original file line number Diff line number Diff line change 1+ #[ cfg( target_os = "macos" ) ]
2+ use core:: ptr;
13use core:: { fmt:: Display , mem, str} ;
24use std:: env;
35use std:: fs;
@@ -163,7 +165,7 @@ fn select_fd(fd: RawFd, timeout: i32) -> io::Result<bool> {
163165
164166 let mut timeout_val;
165167 let timeout = if timeout < 0 {
166- std :: ptr:: null_mut ( )
168+ ptr:: null_mut ( )
167169 } else {
168170 timeout_val = libc:: timeval {
169171 tv_sec : ( timeout / 1000 ) as _ ,
@@ -177,8 +179,8 @@ fn select_fd(fd: RawFd, timeout: i32) -> io::Result<bool> {
177179 let ret = libc:: select (
178180 fd + 1 ,
179181 & mut read_fd_set,
180- std :: ptr:: null_mut ( ) ,
181- std :: ptr:: null_mut ( ) ,
182+ ptr:: null_mut ( ) ,
183+ ptr:: null_mut ( ) ,
182184 timeout,
183185 ) ;
184186 if ret < 0 {
Original file line number Diff line number Diff line change 1+ use crate :: ansi:: AnsiCodeIterator ;
2+ use core:: mem;
3+ use core:: str:: { from_utf8, Bytes } ;
14use std:: io;
2- use std:: mem;
35use std:: os:: windows:: io:: AsRawHandle ;
4- use std:: str:: Bytes ;
56
67use windows_sys:: Win32 :: Foundation :: HANDLE ;
78use windows_sys:: Win32 :: System :: Console :: {
@@ -289,9 +290,6 @@ impl Color {
289290}
290291
291292pub ( crate ) fn console_colors ( out : & Term , mut con : Console , bytes : & [ u8 ] ) -> io:: Result < ( ) > {
292- use crate :: ansi:: AnsiCodeIterator ;
293- use std:: str:: from_utf8;
294-
295293 let s = from_utf8 ( bytes) . expect ( "data to be printed is not an ansi string" ) ;
296294 let mut iter = AnsiCodeIterator :: new ( s) ;
297295
Original file line number Diff line number Diff line change 1- use std:: cmp;
1+ use core:: fmt:: Display ;
2+ use core:: iter:: once;
3+ use core:: mem:: { self , MaybeUninit } ;
4+ use core:: { char, cmp} ;
25use std:: env;
36use std:: ffi:: OsStr ;
4- use std:: fmt:: Display ;
57use std:: io;
6- use std:: iter:: once;
7- use std:: mem;
88use std:: os:: raw:: c_void;
99use std:: os:: windows:: ffi:: OsStrExt ;
1010use std:: os:: windows:: io:: AsRawHandle ;
11- use std:: { char, mem:: MaybeUninit } ;
1211
1312use encode_unicode:: error:: Utf16TupleError ;
1413use encode_unicode:: CharExt ;
@@ -590,7 +589,7 @@ pub(crate) fn msys_tty_on(term: &Term) -> bool {
590589 handle as HANDLE ,
591590 FileNameInfo ,
592591 & mut name_info as * mut _ as * mut c_void ,
593- std :: mem:: size_of :: < FILE_NAME_INFO > ( ) as u32 ,
592+ mem:: size_of :: < FILE_NAME_INFO > ( ) as u32 ,
594593 ) ;
595594 if res == 0 {
596595 return false ;
You can’t perform that action at this time.
0 commit comments