mirror of
https://github.com/atuinsh/atuin.git
synced 2026-10-11 22:29:51 +00:00
chore: fix Clippy warning about time::Duration (#4231)
`cargo clippy` currently generates this warning: ``` warning: `time::Duration::new` does not refer to a reachable function --> /home/taylor/code/atuin/clippy.toml:6:1 | 6 | / [[disallowed-methods]] 7 | | path = "time::Duration::new" 8 | | reason = "panics on overflow; use atuin_common::time::DurationExt::try_new" | |___________________________________________________________________________^ | ``` `time` 0.3.54 made `Duration` an alias of `SignedDuration` instead of a struct in its own right, and we're on 0.3.55 now. Clippy can't resolve the type alias, so this PR updates the path in clippy.toml to point to `SignedDuration`.
This commit is contained in:
+1
-1
@@ -4,7 +4,7 @@ reason = """panics on overflow; use atuin_common::time::DurationExt::try_new, or
|
||||
Duration::from_secs when nanos are 0"""
|
||||
|
||||
[[disallowed-methods]]
|
||||
path = "time::Duration::new"
|
||||
path = "time::SignedDuration::new"
|
||||
reason = "panics on overflow; use atuin_common::time::DurationExt::try_new"
|
||||
|
||||
[[disallowed-methods]]
|
||||
|
||||
Reference in New Issue
Block a user