diff --git a/Cargo.lock b/Cargo.lock index e5e8a73..3e01946 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2024,9 +2024,9 @@ dependencies = [ [[package]] name = "yansi" -version = "0.5.1" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec" +checksum = "6c2861d76f58ec8fc95708b9b1e417f7b12fd72ad33c01fa6886707092dea0d3" [[package]] name = "zeroize" diff --git a/Cargo.toml b/Cargo.toml index 2f154b3..8cd51d9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -28,7 +28,7 @@ tabled = "0.15.0" thiserror = "1.0.57" tokio = { version = "1.29.1", features = ["full"] } url = { version = "2.5.0" } -yansi = { version = "0.5" } +yansi = { version = "1.0" } # [target.'cfg(linux)'.dependencies] [target.'cfg(not(target_os = "windows"))'.dependencies] # Our dependencies don't use OpenSSL on Windows diff --git a/src/lib.rs b/src/lib.rs index bc92c77..319c904 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -91,7 +91,7 @@ pub fn download_selected(songs: Vec, args: &Args) -> MusdResult<()> { // println!("Start to download {}!", Paint::green(&selections[selection])); if let Err(e) = download::download_music(sq_songs[selection], args) { - eprintln!("[ERROR]: {}", Paint::red(e)); + eprintln!("[ERROR]: {}", Paint::red(&e)); std::process::exit(2); } Ok(()) diff --git a/src/main.rs b/src/main.rs index c99284f..9c18351 100644 --- a/src/main.rs +++ b/src/main.rs @@ -13,7 +13,7 @@ fn main() { let args = musd::Args::parse(); // Disable coloring by `CLICOLOR` env variable if let Ok(true) = std::env::var("CLICOLOR").map(|v| v == "0") { - Paint::disable(); + yansi::disable(); } if args.build_info { @@ -24,7 +24,7 @@ fn main() { if let Err(e) = musd::search(&args.music.join(" ")).and_then(|songs| musd::download_selected(songs, &args)) { - eprintln!("[ERROR]: {}", Paint::red(e)); + eprintln!("[ERROR]: {}", Paint::red(&e)); std::process::exit(1); } }