diff --git a/CHANGELOG.md b/CHANGELOG.md index a3ba6ebc..99f48324 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed - Remove `quick_xml::Error` from the public API. [#332](https://github.com/jonhoo/inferno/pull/332) +- Remove reliance on the `is_terminal` crate. [#301](https://github.com/jonhoo/inferno/pull/301) ### Removed diff --git a/Cargo.lock b/Cargo.lock index 18de8d44..89f47c2e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -467,7 +467,6 @@ dependencies = [ "dashmap", "env_logger", "indexmap", - "is-terminal", "itoa", "libflate", "log", diff --git a/Cargo.toml b/Cargo.toml index 4e7ead80..7987b039 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -28,7 +28,6 @@ nameattr = ["indexmap"] [dependencies] ahash = "0.8" -is-terminal = "0.4.3" crossbeam-utils = { version = "0.8", optional = true } crossbeam-channel = { version = "0.5", optional = true } dashmap = { version = "6.0.1", optional = true } diff --git a/src/bin/diff-folded.rs b/src/bin/diff-folded.rs index b9b4ab69..a5562675 100644 --- a/src/bin/diff-folded.rs +++ b/src/bin/diff-folded.rs @@ -1,10 +1,9 @@ -use std::io; +use std::io::{self, IsTerminal}; use std::path::PathBuf; use clap::{ArgAction, Parser}; use env_logger::Env; use inferno::differential::{self, Options}; -use is_terminal::IsTerminal; #[derive(Debug, Parser)] #[clap( diff --git a/src/bin/flamegraph.rs b/src/bin/flamegraph.rs index f82cf076..2a73bbf6 100644 --- a/src/bin/flamegraph.rs +++ b/src/bin/flamegraph.rs @@ -1,4 +1,4 @@ -use std::io; +use std::io::{self, IsTerminal}; use std::path::{Path, PathBuf}; use clap::builder::TypedValueParser; @@ -11,7 +11,6 @@ use inferno::flamegraph::{self, defaults, Direction, Options, Palette, TextTrunc #[cfg(feature = "nameattr")] use inferno::flamegraph::FuncFrameAttrsMap; -use is_terminal::IsTerminal; #[derive(Debug, Parser)] #[clap(name = "inferno-flamegraph", about)] diff --git a/src/collapse/mod.rs b/src/collapse/mod.rs index 37dc7561..79403264 100644 --- a/src/collapse/mod.rs +++ b/src/collapse/mod.rs @@ -67,15 +67,13 @@ pub mod vsprof; /// [crate-level documentation]: ../../index.html pub mod ghcprof; -use is_terminal::IsTerminal; - // DEFAULT_NTHREADS is public because we use it in the help text of the binaries, // but it doesn't need to be exposed to library users, hence #[doc(hidden)]. #[doc(hidden)] pub use self::common::DEFAULT_NTHREADS; use std::fs::File; -use std::io; +use std::io::{self, IsTerminal}; use std::path::Path; use self::common::{CollapsePrivate, CAPACITY_READER};