mirror of
https://github.com/sharkdp/hyperfine.git
synced 2026-11-01 08:50:19 +00:00
Update warnings, switch to colored crate
This commit is contained in:
1 parent
2ddc21c7d4
commit
d5c21ec272
8 files changed
+101
-87
No files matched your search
+3
-3
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user