use eprintln!

This commit is contained in:
bootandy
2018-05-01 13:55:19 +01:00
parent 6e2e5761d8
commit b68c450710
+1 -4
View File
@@ -5,7 +5,6 @@ extern crate walkdir;
use self::display::draw_it; use self::display::draw_it;
use clap::{App, AppSettings, Arg}; use clap::{App, AppSettings, Arg};
use std::io::{self, Write};
use utils::{find_big_ones, get_dir_tree, sort}; use utils::{find_big_ones, get_dir_tree, sort};
mod display; mod display;
@@ -67,9 +66,7 @@ fn main() {
if options.is_present("depth") if options.is_present("depth")
&& options.value_of("number_of_lines").unwrap() != DEFAULT_NUMBER_OF_LINES && options.value_of("number_of_lines").unwrap() != DEFAULT_NUMBER_OF_LINES
{ {
io::stderr() eprintln!("Use either -n for number of directories to show. Or -d for depth. Not both");
.write(b"Use either -n for number of directories to show. Or -d for depth. Not both")
.expect("Error writing to stderr. Oh the irony!");
return; return;
} }