@@ -10,7 +10,7 @@ use std::{
1010 ffi:: { OsStr , OsString } ,
1111 fmt:: Display ,
1212 fs,
13- io:: { self , BufRead , BufReader , Read } ,
13+ io:: { self , stderr , BufRead , BufReader , Read , Write } ,
1414 process:: { Command , Stdio } ,
1515} ;
1616
@@ -439,7 +439,7 @@ impl CommandBuilder<'_> {
439439 }
440440
441441 if self . options . verbose {
442- eprintln ! ( "{command:?}" ) ;
442+ let _ = writeln ! ( stderr ( ) , "{command:?}" ) ;
443443 }
444444
445445 match & self . options . action {
@@ -827,7 +827,7 @@ fn normalize_options(options: Options, matches: &clap::ArgMatches) -> Options {
827827 ( options. max_args , options. max_lines , None )
828828 }
829829 _ => {
830- eprintln ! (
830+ let _ = writeln ! ( stderr ( ) ,
831831 "WARNING: -L, -n and -I/-i are mutually exclusive, but more than one were given; \
832832 only the last option will be used"
833833 ) ;
@@ -1154,7 +1154,7 @@ pub fn xargs_main(args: &[&str]) -> i32 {
11541154 Ok ( CommandResult :: Success ) => 0 ,
11551155 Ok ( CommandResult :: Failure ) => 123 ,
11561156 Err ( e) => {
1157- eprintln ! ( "Error: {e}" ) ;
1157+ let _ = writeln ! ( stderr ( ) , "Error: {e}" ) ;
11581158 if let XargsError :: CommandExecution ( cx) = e {
11591159 match cx {
11601160 CommandExecutionError :: UrgentlyFailed => 124 ,
0 commit comments