diff --git a/Cargo.lock b/Cargo.lock index 11bdcd2..14d6842 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -37,6 +37,21 @@ dependencies = [ "memchr", ] +[[package]] +name = "anstream" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd0982309face56a044e935a18bbffcddeb1ce72e69a3ecc3bafb56d4e959f37" +dependencies = [ + "anstyle", + "anstyle-parse", + "anstyle-wincon", + "concolor-override", + "concolor-query", + "is-terminal", + "utf8parse", +] + [[package]] name = "anstyle" version = "0.3.1" @@ -52,21 +67,6 @@ dependencies = [ "utf8parse", ] -[[package]] -name = "anstyle-stream" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1383966ba5bad155fe30bb239f7ca9eb149990674414aee2f8aef35a0a2dc9d0" -dependencies = [ - "anstyle", - "anstyle-parse", - "anstyle-wincon", - "concolor-override", - "concolor-query", - "is-terminal", - "utf8parse", -] - [[package]] name = "anstyle-syntect" version = "0.2.0" @@ -548,8 +548,8 @@ dependencies = [ name = "git-dive" version = "0.1.1" dependencies = [ + "anstream", "anstyle", - "anstyle-stream", "anstyle-syntect", "anyhow", "bincode", @@ -659,12 +659,12 @@ checksum = "fed44880c466736ef9a5c5b5facefb5ed0785676d0c02d612db14e54f0d84286" [[package]] name = "human-panic" -version = "1.1.2" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01befeb1a5abdb1be59d850de4f03363b38d9fb4b766e2f6d56789dc21ac036a" +checksum = "0a6557b29bbdc9d6c7a5cdbe2962e78eaf48115e8d55b0b62282956981c1f605" dependencies = [ + "anstream", "anstyle", - "anstyle-stream", "backtrace", "os_info", "serde", @@ -1140,12 +1140,12 @@ checksum = "f67ad224767faa3c7d8b6d91985b78e70a1324408abcb1cfcc2be4c06bc06043" [[package]] name = "snapbox" -version = "0.4.9" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67df287b9e7dcdc29ab4938b4dffa2858ec39ac206322103e34435599e9cebf3" +checksum = "9615402f9cff539301119bdf2c2f328739cf2b45c2116666618fb6ac399f75bb" dependencies = [ + "anstream", "anstyle", - "anstyle-stream", "content_inspector", "dunce", "filetime", @@ -1158,11 +1158,11 @@ dependencies = [ [[package]] name = "snapbox-macros" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce20b825fcd690a5cff6b5f6b7ee3cef7adf71820772263e4f28e155f1c164f5" +checksum = "f8e40c667388ed1cb5060f545d0013bf0a23efdfa6c5c3e9ef592de391cd860f" dependencies = [ - "anstyle-stream", + "anstream", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 91da716..a776b66 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -37,13 +37,13 @@ env_logger = { version = "0.10.0", default-features = false, features = ["color" concolor = "0.1.1" concolor-clap = { version = "0.1.0", features = ["api"] } proc-exit = "2.0.1" -human-panic = "1.1.2" +human-panic = "1.1.3" anyhow = "1.0.68" syntect = { version = "5.0.0", default-features = false, features = ["parsing", "regex-fancy"] } terminal_size = "0.2.3" textwrap = "0.16.0" anstyle = "0.3.1" -anstyle-stream = "0.2.2" +anstream = "0.2.2" is-terminal = "0.4.4" content_inspector = "0.2.4" encoding = "0.2.33" @@ -57,5 +57,5 @@ once_cell = "1.17.0" bugreport = "0.5.0" [dev-dependencies] -snapbox = { version = "0.4.9", features = ["path"] } +snapbox = { version = "0.4.10", features = ["path"] } term-transcript = "0.2.0" diff --git a/src/blame.rs b/src/blame.rs index d3994e5..06f5f50 100644 --- a/src/blame.rs +++ b/src/blame.rs @@ -12,8 +12,8 @@ pub fn blame( config: &mut Config, args: &crate::args::Args, ) -> proc_exit::ExitResult { - let colored_stdout = anstyle_stream::AutoStream::choice(&std::io::stdout()) - != anstyle_stream::ColorChoice::Never; + let colored_stdout = + anstream::AutoStream::choice(&std::io::stdout()) != anstream::ColorChoice::Never; let total_width = terminal_size::terminal_size() .map(|(w, _h)| w.0) .or_else(|| std::env::var_os("COLUMNS").and_then(|s| s.to_str()?.parse::().ok())) diff --git a/src/config.rs b/src/config.rs index 320275b..84e4674 100644 --- a/src/config.rs +++ b/src/config.rs @@ -16,7 +16,7 @@ pub fn dump_config(output_path: &std::path::Path, config: &mut Config) -> proc_e if output_path == std::path::Path::new("-") { use std::io::Write; - anstyle_stream::stdout() + anstream::stdout() .write_all(output.as_bytes()) .with_code(proc_exit::Code::FAILURE)?; } else { diff --git a/src/git_pager.rs b/src/git_pager.rs index f45ea9d..508b5ef 100644 --- a/src/git_pager.rs +++ b/src/git_pager.rs @@ -7,7 +7,7 @@ pub struct Pager { impl Pager { pub fn stdout(args: &str) -> Self { - let cmd = anstyle_stream::stdout() + let cmd = anstream::stdout() .is_terminal() .then(|| parse(args)) .flatten(); @@ -15,13 +15,13 @@ impl Pager { } pub fn start(&mut self) -> ActivePager { - let stdout = anstyle_stream::stdout().lock(); + let stdout = anstream::stdout().lock(); if let Some(cmd) = &mut self.cmd { // should use pager instead of stderr if let Ok(p) = cmd.spawn() { - let stderr = anstyle_stream::stderr() + let stderr = anstream::stderr() .is_terminal() - .then(|| anstyle_stream::stderr().lock()); + .then(|| anstream::stderr().lock()); ActivePager { primary: stdout, _secondary: stderr, @@ -45,8 +45,8 @@ impl Pager { } pub struct ActivePager { - primary: anstyle_stream::AutoStream>, - _secondary: Option>>, + primary: anstream::AutoStream>, + _secondary: Option>>, pager: Option, } diff --git a/src/main.rs b/src/main.rs index d98d3d5..e60c58f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -56,11 +56,7 @@ fn run() -> proc_exit::ExitResult { list_themes(&mut config)?; } else if args.acknowledgements { use std::io::Write; - let _ = writeln!( - anstyle_stream::stdout(), - "{}", - assets::get_acknowledgements() - ); + let _ = writeln!(anstream::stdout(), "{}", assets::get_acknowledgements()); } else if args.diagnostic { use bugreport::{bugreport, collector::*, format::Markdown}; @@ -150,8 +146,8 @@ fn list_languages(config: &mut Config) -> proc_exit::ExitResult { } fn list_themes(config: &mut Config) -> proc_exit::ExitResult { - let colored_stdout = anstyle_stream::AutoStream::choice(&std::io::stdout()) - != anstyle_stream::ColorChoice::Never; + let colored_stdout = + anstream::AutoStream::choice(&std::io::stdout()) != anstream::ColorChoice::Never; let pager = config.get(&crate::git2_config::PAGER); let mut pager = Pager::stdout(&pager); let mut pager = pager.start();