From e3ca5689b2b7f4b4c137c324cb6f5273e02a3f02 Mon Sep 17 00:00:00 2001 From: JuanLeon Lahoz Date: Fri, 14 May 2021 09:39:44 +0200 Subject: [PATCH] dev: update dependencies (leverage deps.rs) --- Cargo.lock | 34 +++++----------------------------- Cargo.toml | 6 +++--- README.md | 5 +++-- src/main.rs | 3 +-- 4 files changed, 12 insertions(+), 36 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 2bde084..579bfb0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -63,12 +63,6 @@ version = "1.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" -[[package]] -name = "cfg-if" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" - [[package]] name = "cfg-if" version = "1.0.0" @@ -226,7 +220,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c9495705279e7140bf035dde1f6e750c162df8b625267cd52cc44e0b156732c8" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "libc", "wasi", ] @@ -277,18 +271,6 @@ dependencies = [ "hashbrown", ] -[[package]] -name = "isatty" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e31a8281fc93ec9693494da65fbf28c0c2aa60a2eaec25dc58e2f31952e95edc" -dependencies = [ - "cfg-if 0.1.10", - "libc", - "redox_syscall 0.1.57", - "winapi", -] - [[package]] name = "lazy_static" version = "1.4.0" @@ -307,7 +289,7 @@ version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", ] [[package]] @@ -315,12 +297,12 @@ name = "lowcharts" version = "0.3.2" dependencies = [ "assert_cmd", + "atty", "chrono", "clap", "derive_builder", "float_eq", "humantime", - "isatty", "log", "predicates", "regex", @@ -483,12 +465,6 @@ dependencies = [ "rand_core", ] -[[package]] -name = "redox_syscall" -version = "0.1.57" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce" - [[package]] name = "redox_syscall" version = "0.2.6" @@ -567,10 +543,10 @@ version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dac1c663cfc93810f88aed9b8941d48cabf856a1b111c29a40439018d870eb22" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "libc", "rand", - "redox_syscall 0.2.6", + "redox_syscall", "remove_dir_all", "winapi", ] diff --git a/Cargo.toml b/Cargo.toml index cd37bcc..2e1be58 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,16 +15,16 @@ license = "MIT" [dependencies] clap = "3.0.0-beta.2" yansi = "0.5.0" -isatty = "0.1" +atty = "0.2" derive_builder = "0.10.0" regex = "1.4.5" chrono = "0.4" humantime = "2.1.0" simplelog = "^0.10.0" -log = "*" +log = "^0" [dev-dependencies] -float_eq = "0.5.0" +float_eq = "^0" tempfile = "3" assert_cmd = "1.0.3" predicates = "1.0.8" diff --git a/README.md b/README.md index 6051833..52cba38 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,9 @@ # lowcharts Tool to draw low-resolution graphs in terminal. +[![Rust](https://github.com/juan-leon/lowcharts/actions/workflows/test.yml/badge.svg)](https://github.com/juan-leon/lowcharts/actions/workflows/test.yml) +[![dependency status](https://deps.rs/repo/github/juan-leon/lowcharts/status.svg)](https://deps.rs/repo/github/juan-leon/lowcharts) + **lowcharts** is meant to be used in those scenarios where we have numerical data in text files that we want to display in the terminal to do a basic analysis. @@ -13,8 +16,6 @@ metrics exposed to a prometheus (or similar) and graphed in a grafana dashboard troubleshoot a service with nothing more of what we can muster in a shell terminal. -[![Rust](https://github.com/juan-leon/lowcharts/actions/workflows/test.yml/badge.svg)](https://github.com/juan-leon/lowcharts/actions/workflows/test.yml) - ### Usage Type `lowcharts --help`, or `lowcharts PLOT-TYPE --help` for a complete list of diff --git a/src/main.rs b/src/main.rs index 208b0ad..50083cd 100644 --- a/src/main.rs +++ b/src/main.rs @@ -11,7 +11,6 @@ extern crate derive_builder; extern crate log; use chrono::Duration; use clap::ArgMatches; -use isatty::stdout_isatty; use regex::Regex; use simplelog::{ColorChoice, ConfigBuilder, LevelFilter, TermLogger, TerminalMode}; use yansi::Paint; @@ -28,7 +27,7 @@ fn configure_output(option: &str, verbose: bool) { "auto" => match env::var("TERM") { Ok(value) if value == "dumb" => Paint::disable(), _ => { - if !stdout_isatty() { + if atty::isnt(atty::Stream::Stdout) { Paint::disable(); } }