From b68c4507109660e70389ecc0cc014348fa412045 Mon Sep 17 00:00:00 2001 From: bootandy Date: Tue, 1 May 2018 13:55:19 +0100 Subject: [PATCH] use eprintln! --- src/main.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/main.rs b/src/main.rs index 7383a64..ba3db03 100644 --- a/src/main.rs +++ b/src/main.rs @@ -5,7 +5,6 @@ extern crate walkdir; use self::display::draw_it; use clap::{App, AppSettings, Arg}; -use std::io::{self, Write}; use utils::{find_big_ones, get_dir_tree, sort}; mod display; @@ -67,9 +66,7 @@ fn main() { if options.is_present("depth") && options.value_of("number_of_lines").unwrap() != DEFAULT_NUMBER_OF_LINES { - io::stderr() - .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!"); + eprintln!("Use either -n for number of directories to show. Or -d for depth. Not both"); return; }