File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -478,17 +478,17 @@ fn get_input_type(path: &OsString) -> CatResult<InputType> {
478478/// simple memory copy.
479479fn write_fast < R : FdReadable > ( handle : & mut InputHandle < R > ) -> CatResult < ( ) > {
480480 let stdout = io:: stdout ( ) ;
481- let mut stdout_lock = stdout. lock ( ) ;
482481 #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
483482 {
484483 // If we're on Linux or Android, try to use the splice() system call
485484 // for faster writing. If it works, we're done.
486- if !splice:: write_fast_using_splice ( handle, & stdout_lock ) ? {
485+ if !splice:: write_fast_using_splice ( handle, & stdout ) ? {
487486 return Ok ( ( ) ) ;
488487 }
489488 }
490489 // If we're not on Linux or Android, or the splice() call failed,
491490 // fall back on slower writing.
491+ let mut stdout_lock = stdout. lock ( ) ;
492492 let mut buf = [ 0 ; 1024 * 64 ] ;
493493 loop {
494494 match handle. reader . read ( & mut buf) {
You can’t perform that action at this time.
0 commit comments