Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.

use FnOnce for PrimitiveArray::apply_validity #1176

Merged
merged 2 commits into from
Jul 23, 2022

Conversation

ritchie46
Copy link
Collaborator

Allow passed closures to mutably borrow from their environment.

@ritchie46 ritchie46 changed the title use FnMut for PrimitiveArray::apply_validity use FnMut for PrimitiveArray::apply_validity Jul 22, 2022
@codecov
Copy link

codecov bot commented Jul 22, 2022

Codecov Report

Merging #1176 (0ff0467) into main (dc77578) will decrease coverage by 0.00%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main    #1176      +/-   ##
==========================================
- Coverage   83.69%   83.68%   -0.01%     
==========================================
  Files         365      365              
  Lines       35873    35873              
==========================================
- Hits        30023    30020       -3     
- Misses       5850     5853       +3     
Impacted Files Coverage Δ
src/array/primitive/mod.rs 81.04% <ø> (ø)
src/io/ipc/read/stream_async.rs 74.65% <0.00%> (-2.06%) ⬇️
src/io/ipc/read/file_async.rs 60.44% <0.00%> (-0.75%) ⬇️
src/io/ipc/read/reader.rs 96.32% <0.00%> (+0.33%) ⬆️
src/bitmap/utils/slice_iterator.rs 98.78% <0.00%> (+1.21%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update dc77578...0ff0467. Read the comment docs.

@ritchie46
Copy link
Collaborator Author

Maybe we should have two versions so that callers can choose what they need. E.g. an apply_validity and an apply_validity_mut. 🤔

@jorgecarleitao jorgecarleitao changed the title use FnMut for PrimitiveArray::apply_validity use FnOnce for PrimitiveArray::apply_validity Jul 23, 2022
@jorgecarleitao jorgecarleitao added the bug Something isn't working label Jul 23, 2022
@jorgecarleitao jorgecarleitao merged commit f79c4bd into jorgecarleitao:main Jul 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants