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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

airwoodix
Copy link

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
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.

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
2 participants