Skip to content

Commit

Permalink
Remove reliance on is-terminal
Browse files Browse the repository at this point in the history
Cherry-picks #301
  • Loading branch information
jonhoo committed Nov 19, 2024
1 parent cf4f325 commit 75464f9
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 9 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 0 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down
3 changes: 1 addition & 2 deletions src/bin/diff-folded.rs
Original file line number Diff line number Diff line change
@@ -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(
Expand Down
3 changes: 1 addition & 2 deletions src/bin/flamegraph.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use std::io;
use std::io::{self, IsTerminal};
use std::path::{Path, PathBuf};

use clap::builder::TypedValueParser;
Expand All @@ -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)]
Expand Down
4 changes: 1 addition & 3 deletions src/collapse/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down

0 comments on commit 75464f9

Please sign in to comment.