Skip to content

Conversation

@hawkw
Copy link
Contributor

@hawkw hawkw commented Feb 1, 2022

It looks like clippy's disallowed methods can't detect the use of
disallowed operators, so #1456 misses a bunch of uses of the -
operator on Instants, mostly in metrics, tap, and the log timestamp
formatter.

This fixes all of them that I could find.

It looks like clippy's disallowed methods can't detect the use of
disallowed *operators*, so #1456 misses a bunch of uses of the `-`
operator on `Instant`s, mostly in metrics, tap, and the log timestamp
formatter.

This fixes all of them that I could find.
@hawkw hawkw requested review from a team and olix0r February 1, 2022 18:36
Copy link
Contributor Author

@hawkw hawkw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i missed that a couple of those were actually <Instant> - <Duration> instead, which broke when changed to saturating_duration_since (and, the non-saturating subs were legit in that case since the Duration is not going to time travel)

Copy link
Member

@olix0r olix0r left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent, thanks!

@olix0r olix0r merged commit d15cee8 into ver/saturating_duration_since Feb 1, 2022
@olix0r olix0r deleted the eliza/fix-minuses branch February 1, 2022 19:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants