Update warnings, switch to colored crate

This commit is contained in:
sharkdp authored and David Peter committed 2018-01-24 20:30:40 +01:00
1 parent 2ddc21c7d4
commit d5c21ec272
8 files changed
+101 -87

No files matched your search

+3 -3
View File
@@ -1,6 +1,6 @@
extern crate ansi_term;
#[macro_use]
extern crate clap;
extern crate colored;
extern crate indicatif;
extern crate libc;
extern crate statistical;
@@ -13,7 +13,7 @@ use std::cmp;
use std::error::Error;
use std::io;
use ansi_term::Colour::Red;
use colored::*;
use clap::{App, AppSettings, Arg};
mod hyperfine;
@@ -23,7 +23,7 @@ use hyperfine::benchmark::{mean_shell_spawning_time, run_benchmark};
/// Print error message to stderr and terminate
pub fn error(message: &str) -> ! {
eprintln!("{}: {}", Red.paint("Error"), message);
eprintln!("{} {}", "Error:".red(), message);
std::process::exit(1);
}