Closed johnbatty closed 7 months ago
I'm open to changing the deprecation message, but my initial thought is why you're using time::Instant
instead of std::time::Instant
if you're not using any of the additional interoperability time
provides? It is otherwise a trivial wrapper struct.
It wasn't a conscious decision to pick time::Instant
over std::time::Instant
. I just happened to be already using the time
crate (for formatting) and saw that it included Instant
. So I'm happy to switch (and already have).
The deprecation message has been changed on main
.
time::Instant
was deprecated in 0.3.35: https://github.com/time-rs/time/issues/650The deprecation error message displayed by clippy is:
This is confusing advice, as the primary fix is to use
std::time::Instant
rather thantime::Instant
. It took me a while to figure this out. There are some additional extension methods defined intime::ext::InstantExt
, but these won't be required by most users.I suggest that the error is changed to: