Skip to content

Commit 8d9b6b2

Browse files
Remove humantime dependency
1 parent e516f8e commit 8d9b6b2

File tree

3 files changed

+34
-14
lines changed

3 files changed

+34
-14
lines changed

Cargo.lock

Lines changed: 30 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ itertools = { version = "0.14.0" }
6060
rusqlite = { version = "0.32.1", features = ["bundled"] }
6161
hex = "0.4.3"
6262
derive_more = { version = "2.0.0", features = ["display"] }
63+
jiff = "0.2.4"
6364

6465
# Async
6566
tokio = { version = "1.0", features = ["rt-multi-thread", "signal", "macros"] }
@@ -98,7 +99,6 @@ chrono = { version = "0.4.11", default-features = false, features = ["clock", "s
9899

99100
# Transitive dependencies we don't use directly but need to have specific versions of
100101
thread_local = "1.1.3"
101-
humantime = "2.1.0"
102102
constant_time_eq = "0.3.0"
103103

104104
[target.'cfg(target_os = "linux")'.dependencies]

src/bin/cratesfyi.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ use docs_rs::{
2020
start_background_metrics_webserver, start_web_server,
2121
};
2222
use futures_util::StreamExt;
23-
use humantime::Duration;
23+
use jiff::SignedDuration;
2424
use once_cell::sync::OnceCell;
2525
use sentry::{
2626
TransactionContext, integrations::panic as sentry_panic,
@@ -712,7 +712,7 @@ enum LimitsSubcommand {
712712
#[arg(long)]
713713
targets: Option<usize>,
714714
#[arg(long)]
715-
timeout: Option<Duration>,
715+
timeout: Option<SignedDuration>,
716716
},
717717

718718
/// Remove sandbox limits overrides for a crate
@@ -748,7 +748,7 @@ impl LimitsSubcommand {
748748
let overrides = Overrides {
749749
memory,
750750
targets,
751-
timeout: timeout.map(Into::into),
751+
timeout: timeout.and_then(|d| d.try_into().ok()),
752752
};
753753
Overrides::save(&mut conn, &crate_name, overrides).await?;
754754
let overrides = Overrides::for_crate(&mut conn, &crate_name).await?;

0 commit comments

Comments
 (0)