aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Cargo.lock60
-rw-r--r--crates/atuin-client/Cargo.toml2
-rw-r--r--crates/atuin-client/src/settings.rs4
3 files changed, 4 insertions, 62 deletions
diff --git a/Cargo.lock b/Cargo.lock
index 09cec119..352bfa24 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -257,13 +257,13 @@ dependencies = [
"futures",
"generic-array",
"hex",
+ "humantime",
"indicatif",
"interim",
"itertools 0.12.1",
"log",
"memchr",
"minspan",
- "parse_duration",
"pretty_assertions",
"rand",
"regex",
@@ -2287,31 +2287,6 @@ dependencies = [
]
[[package]]
-name = "num"
-version = "0.2.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b8536030f9fea7127f841b45bb6243b27255787fb4eb83958aa1ef9d2fdc0c36"
-dependencies = [
- "num-bigint",
- "num-complex",
- "num-integer",
- "num-iter",
- "num-rational",
- "num-traits",
-]
-
-[[package]]
-name = "num-bigint"
-version = "0.2.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "090c7f9998ee0ff65aa5b723e4009f7b217707f1fb5ea551329cc4d6231fb304"
-dependencies = [
- "autocfg",
- "num-integer",
- "num-traits",
-]
-
-[[package]]
name = "num-bigint-dig"
version = "0.8.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -2329,16 +2304,6 @@ dependencies = [
]
[[package]]
-name = "num-complex"
-version = "0.2.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b6b19411a9719e753aff12e5187b74d60d3dc449ec3f4dc21e3989c3f554bc95"
-dependencies = [
- "autocfg",
- "num-traits",
-]
-
-[[package]]
name = "num-conv"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -2365,18 +2330,6 @@ dependencies = [
]
[[package]]
-name = "num-rational"
-version = "0.2.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5c000134b5dbf44adc5cb772486d335293351644b801551abe8f75c84cfa4aef"
-dependencies = [
- "autocfg",
- "num-bigint",
- "num-integer",
- "num-traits",
-]
-
-[[package]]
name = "num-traits"
version = "0.2.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -2513,17 +2466,6 @@ dependencies = [
]
[[package]]
-name = "parse_duration"
-version = "2.1.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7037e5e93e0172a5a96874380bf73bc6ecef022e26fa25f2be26864d6b3ba95d"
-dependencies = [
- "lazy_static",
- "num",
- "regex",
-]
-
-[[package]]
name = "password-hash"
version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
diff --git a/crates/atuin-client/Cargo.toml b/crates/atuin-client/Cargo.toml
index 5b1ae78b..618fec32 100644
--- a/crates/atuin-client/Cargo.toml
+++ b/crates/atuin-client/Cargo.toml
@@ -33,7 +33,7 @@ interim = { workspace = true }
config = { workspace = true }
serde = { workspace = true }
serde_json = { workspace = true }
-parse_duration = "2.1.1"
+humantime = "2.1.0"
async-trait = { workspace = true }
itertools = { workspace = true }
rand = { workspace = true }
diff --git a/crates/atuin-client/src/settings.rs b/crates/atuin-client/src/settings.rs
index f4434e41..0f1b443a 100644
--- a/crates/atuin-client/src/settings.rs
+++ b/crates/atuin-client/src/settings.rs
@@ -9,7 +9,7 @@ use config::{
};
use eyre::{bail, eyre, Context, Error, Result};
use fs_err::{create_dir_all, File};
-use parse_duration::parse;
+use humantime::parse_duration;
use regex::RegexSet;
use semver::Version;
use serde::{Deserialize, Serialize};
@@ -553,7 +553,7 @@ impl Settings {
return Ok(false);
}
- match parse(self.sync_frequency.as_str()) {
+ match parse_duration(self.sync_frequency.as_str()) {
Ok(d) => {
let d = time::Duration::try_from(d).unwrap();
Ok(OffsetDateTime::now_utc() - Settings::last_sync()? >= d)