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

Use web-time instead of unmaintained instant crate. #539

Merged
merged 2 commits into from
Jan 3, 2025

Conversation

airwoodix
Copy link
Contributor

Fixes #538.

The changes are mostly trivial, mainly replacing instant::Duration with web_time::Duration.

I also made some small changes in the relevant doctests, using e.g. Duration::ZERO instead of Duration::new(0, 0) or Duration::from_nanos(x) instead of Duration::new(0, x).

My understanding is that the equivalent of the instant's wasm-bindgen feature is always enabled for web-time, though I didn't check what the CI checks on wasm targets.

@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 93.75000% with 2 lines in your changes missing coverage. Please review.

Project coverage is 91.91%. Comparing base (c7673ef) to head (56c94a1).

Files with missing lines Patch % Lines
crates/argmin/src/core/executor.rs 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #539      +/-   ##
==========================================
- Coverage   91.92%   91.91%   -0.02%     
==========================================
  Files         177      177              
  Lines       23724    23727       +3     
==========================================
  Hits        21808    21808              
- Misses       1916     1919       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@airwoodix
Copy link
Contributor Author

The cargo-deny CI job failure here (multiple occurences) doesn't seem to be directly related to the addition of the web-time dependency (the offending packages are transitively pulled-in by the eframe dependency in the spectator crate).

Would 2bb66df still be ok? The Unicode-3.0 license is OSI-approved and allowed e.g. in the cargo-deny repository.

Copy link
Member

@stefan-k stefan-k left a comment

Choose a reason for hiding this comment

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

Hi @airwoodix , apologies for the late reply! Thanks a lot for this PR, I really appreciate it! :) Adding Unicode-3.0 to the allowed licenses seems good to me, thanks for fixing this too along the way!

@stefan-k stefan-k merged commit f77e261 into argmin-rs:main Jan 3, 2025
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.

RUSTSEC-2024-0384: instant is unmaintained
3 participants