From 0004a713500c858a24d27cbdedab5686e360fee5 Mon Sep 17 00:00:00 2001 From: Conrad Ludgate Date: Fri, 9 Sep 2022 16:04:11 +0100 Subject: bumps --- Cargo.lock | 19 +++++++++---------- Cargo.toml | 8 ++++---- src/command/client/search.rs | 12 +++--------- 3 files changed, 16 insertions(+), 23 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6a25cb6d..40e2a73d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -395,7 +395,9 @@ dependencies = [ "encode_unicode", "libc", "once_cell", + "regex", "terminal_size", + "unicode-width", "winapi", ] @@ -902,14 +904,13 @@ dependencies = [ [[package]] name = "indicatif" -version = "0.16.2" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d207dc617c7a380ab07ff572a6e52fa202a2a8f355860ac9c38e23f8196be1b" +checksum = "fcc42b206e70d86ec03285b123e65a5458c92027d1fb2ae3555878b8113b3ddf" dependencies = [ "console", - "lazy_static", "number_prefix", - "regex", + "unicode-width", ] [[package]] @@ -1533,13 +1534,11 @@ dependencies = [ [[package]] name = "rpassword" -version = "6.0.1" +version = "7.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bf099a1888612545b683d2661a1940089f6c2e5a8e38979b2159da876bfd956" +checksum = "26b763cb66df1c928432cc35053f8bd4cec3335d8559fc16010017d16b3c1680" dependencies = [ "libc", - "serde", - "serde_json", "winapi", ] @@ -2211,9 +2210,9 @@ checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" [[package]] name = "tui" -version = "0.18.0" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96fe69244ec2af261bced1d9046a6fee6c8c2a6b0228e59e5ba39bc8ba4ed729" +checksum = "ccdd26cbd674007e649a272da4475fb666d3aa0ad0531da7136db6fab0e5bad1" dependencies = [ "bitflags", "cassowary", diff --git a/Cargo.toml b/Cargo.toml index 8ea326de..63284fd6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ name = "atuin" version = "0.10.0" authors = ["Ellie Huxtable "] -edition = "2018" +edition = "2021" rust-version = "1.59" license = "MIT" description = "atuin - magical shell history" @@ -53,10 +53,10 @@ pretty_env_logger = "0.4" chrono = { version = "0.4", features = ["serde"] } eyre = "0.6" directories = "4" -indicatif = "0.16.2" +indicatif = "0.17.0" serde = { version = "1.0.137", features = ["derive"] } serde_json = "1.0.81" -tui = { version = "0.18", default-features = false, features = ["termion"] } +tui = { version = "0.19", default-features = false, features = ["termion"] } termion = "1.5" unicode-width = "0.1" itertools = "0.10.3" @@ -70,7 +70,7 @@ clap = { version = "3.1.18", features = ["derive"] } clap_complete = "3.1.4" fs-err = "2.7" whoami = "1.1.2" -rpassword = "6.0" +rpassword = "7.0" [dependencies.tracing-subscriber] version = "0.3" diff --git a/src/command/client/search.rs b/src/command/client/search.rs index 5f0da0ca..961403bf 100644 --- a/src/command/client/search.rs +++ b/src/command/client/search.rs @@ -1,10 +1,4 @@ -use std::{ - convert::TryFrom, - env, - io::stdout, - ops::{ControlFlow, Sub}, - time::Duration, -}; +use std::{io::stdout, ops::ControlFlow, time::Duration}; use chrono::Utc; use clap::Parser; @@ -36,7 +30,7 @@ use super::{ history::ListMode, }; -const VERSION: &str = env!("CARGO_PKG_VERSION"); +const VERSION: &str = std::env!("CARGO_PKG_VERSION"); #[derive(Parser)] pub struct Cmd { @@ -184,7 +178,7 @@ fn duration(h: &History) -> String { } fn ago(h: &History) -> String { - let ago = chrono::Utc::now().sub(h.timestamp); + let ago = chrono::Utc::now() - h.timestamp; // Account for the chance that h.timestamp is "in the future" // This would mean that "ago" is negative, and the unwrap here -- cgit v1.2.3