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

[fixup d9afb747e7f10de0a62f1db5c1df71712b7e01de] #5

Merged
merged 1 commit into from
Jun 1, 2023

Conversation

daladim
Copy link
Contributor

@daladim daladim commented Jun 1, 2023

Thanks for mock_instant!

Hi, a commit from April broke the build when the sync feature is enabled.
I've fixed it (it looks fine but disclaimer: I have not read all the logic from this file to double-check before committing)

@museun
Copy link
Owner

museun commented Jun 1, 2023

Oh, yes indeed that shouldn't return a duration. I remember catching that in the unit tests but I guess I forgot to rebase.

The sync reference module is just a mirror of the other one, but with a mutex involved l.

@museun
Copy link
Owner

museun commented Jun 1, 2023

And looking at the code, the OnceCell isn't needed as of like 6 months ago, Mutex::new is const.

As of today, rust 1.70 brought once cell into std so the external dep isn't required, but it's not needed because of the above info. Once I get to a computer I'll merge your fix and then remove that dep

@museun museun merged commit e8be7c4 into museun:master Jun 1, 2023
@museun
Copy link
Owner

museun commented Jun 1, 2023

I've yanked the 0.3.0 release and published a 0.3.1 release

After debating, I won't remove the OnceCell code yet (it'd affect others parts of the code). and 1.70 is still far too new to have as a minimum version.

In the future I will be migrating to std::sync::OnceLock.

Thanks for the patch

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