@@ -142,7 +142,7 @@ impl OutputOptions {
142142
143143 /// We can write fast if we can simply copy the contents of the file to
144144 /// stdout, without augmenting the output with e.g. line numbers.
145- fn can_write_fast ( & self ) -> bool {
145+ fn can_print_fast ( & self ) -> bool {
146146 !( self . show_tabs
147147 || self . show_nonprint
148148 || self . show_ends
@@ -359,10 +359,10 @@ fn cat_handle<R: FdReadable>(
359359 options : & OutputOptions ,
360360 state : & mut OutputState ,
361361) -> CatResult < ( ) > {
362- if options. can_write_fast ( ) {
363- write_fast ( handle)
362+ if options. can_print_fast ( ) {
363+ print_fast ( handle)
364364 } else {
365- write_lines ( handle, options, state)
365+ print_lines ( handle, options, state)
366366 }
367367}
368368
@@ -476,7 +476,7 @@ fn get_input_type(path: &OsString) -> CatResult<InputType> {
476476
477477/// Writes handle to stdout with no configuration. This allows a
478478/// simple memory copy.
479- fn write_fast < R : FdReadable > ( handle : & mut InputHandle < R > ) -> CatResult < ( ) > {
479+ fn print_fast < R : FdReadable > ( handle : & mut InputHandle < R > ) -> CatResult < ( ) > {
480480 let stdout = io:: stdout ( ) ;
481481 #[ cfg( any( target_os = "linux" , target_os = "android" ) ) ]
482482 let mut stdout = stdout;
@@ -490,12 +490,12 @@ fn write_fast<R: FdReadable>(handle: &mut InputHandle<R>) -> CatResult<()> {
490490 }
491491 // If we're not on Linux or Android, or the splice() call failed,
492492 // fall back on slower writing.
493- write_slow ( handle, stdout)
493+ print_slow ( handle, stdout)
494494}
495495
496496#[ cfg_attr( any( target_os = "linux" , target_os = "android" ) , inline( never) ) ] // splice fast-path does not require this allocation
497497#[ cfg_attr( not( any( target_os = "linux" , target_os = "android" ) ) , inline) ]
498- fn write_slow < R : FdReadable > ( handle : & mut InputHandle < R > , stdout : io:: Stdout ) -> CatResult < ( ) > {
498+ fn print_slow < R : FdReadable > ( handle : & mut InputHandle < R > , stdout : io:: Stdout ) -> CatResult < ( ) > {
499499 let mut stdout_lock = stdout. lock ( ) ;
500500 let mut buf = [ 0 ; 1024 * 64 ] ;
501501 loop {
@@ -524,7 +524,7 @@ fn write_slow<R: FdReadable>(handle: &mut InputHandle<R>, stdout: io::Stdout) ->
524524
525525/// Outputs file contents to stdout in a line-by-line fashion,
526526/// propagating any errors that might occur.
527- fn write_lines < R : FdReadable > (
527+ fn print_lines < R : FdReadable > (
528528 handle : & mut InputHandle < R > ,
529529 options : & OutputOptions ,
530530 state : & mut OutputState ,
0 commit comments