-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
refactor(rust): Remove once_cell
in favor of std
equivalents
#21639
Conversation
once_cell
to std
once_cell
@@ -101,7 +100,8 @@ impl From<u8> for StateFlags { | |||
} | |||
} | |||
|
|||
type CachedValue = Arc<(AtomicI64, OnceCell<DataFrame>)>; | |||
// TODO: Replace with `OnceLock<DataFrame>` after `OnceLock::get_or_try_init` is stabilized. | |||
type CachedValue = Arc<(AtomicI64, OnceLock<PolarsResult<DataFrame>>)>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
get_or_try_init
is not stabilized, but this is the only use of it in the codebase. We instead directly store the result type in the oncelock.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am rewriting the cache. That will remove this usage.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After this one, it should be good to go:
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #21639 +/- ##
=======================================
Coverage 80.54% 80.54%
=======================================
Files 1603 1603
Lines 231258 231258
Branches 2650 2650
=======================================
+ Hits 186265 186266 +1
+ Misses 44376 44375 -1
Partials 617 617 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
b218d7e
to
4c676fe
Compare
once_cell
once_cell
in favor of std
equivalents
Removes
once_cell
as a direct dependency, as the functions have been added and stabilized in std. Note that the names will differ:*edit, drafted on second thought