Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop dependency on time #100

Merged
merged 1 commit into from
Jun 20, 2022
Merged

Drop dependency on time #100

merged 1 commit into from
Jun 20, 2022

Conversation

LingMan
Copy link
Contributor

@LingMan LingMan commented Jun 20, 2022

pbr currently depends on version 0.1 of time which is was found to contain a security vulnerability
(RUSTSEC-2020-0071 [1]). Updating to the current 0.3 branch would be a possiblity, however that
doesn't gain us anything over just relying on std. SteadyTime no longer exists and was never
actually steady in the first place [2]. For a while there was a fallback that turned SteadyTime
into an alias for time::Instant [3] which in turn is a wrapper around std::time::Instant adding
support for negative durations.

pbr doesn't deal with negative durations so swap time::Duration for std::time::Duration and
time::SteadyTime for std::time::Instant.

[1] https://rustsec.org/advisories/RUSTSEC-2020-0071
[2] time-rs/time#95
[3] time-rs/time@76e3575

pbr currently depends on version 0.1 of time which is was found to contain a security vulnerability
(RUSTSEC-2020-0071 [1]). Updating to the current 0.3 branch would be a possiblity, however that
doesn't gain us anything over just relying on std. SteadyTime no longer exists and was never
actually steady in the first place [2]. For a while there was a fallback that turned SteadyTime
into an alias for time::Instant [3] which in turn is a wrapper around std::time::Instant adding
support for negative durations.

pbr doesn't deal with negative durations so swap time::Duration for std::time::Duration and
time::SteadyTime for std::time::Instant.

[1] https://rustsec.org/advisories/RUSTSEC-2020-0071
[2] time-rs/time#95
[3] time-rs/time@76e3575
Copy link
Owner

@a8m a8m left a comment

Choose a reason for hiding this comment

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

💯

@a8m a8m merged commit f81de47 into a8m:master Jun 20, 2022
@a8m
Copy link
Owner

a8m commented Jun 20, 2022

Thanks for the contribution @LingMan.

@LingMan LingMan deleted the drop_time branch June 20, 2022 15:05
@LingMan LingMan mentioned this pull request Jul 3, 2022
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.

2 participants