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

Implemented Default for PrimitiveArray #1073

Merged
merged 2 commits into from
Jun 15, 2022

Conversation

ritchie46
Copy link
Collaborator

When dealing with mutable access, which we are improving currently. It is often ergonomic to use std::mem::take to take ownership of a value. When Default is implemented, something cheap is put in the original place.

This PR adds a Default impl for PrimitiveArray that does not allocate.

@codecov
Copy link

codecov bot commented Jun 15, 2022

Codecov Report

Merging #1073 (0f70c8b) into main (39db6fb) will decrease coverage by 0.00%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##             main    #1073      +/-   ##
==========================================
- Coverage   81.01%   81.00%   -0.01%     
==========================================
  Files         366      366              
  Lines       35056    35059       +3     
==========================================
  Hits        28399    28399              
- Misses       6657     6660       +3     
Impacted Files Coverage Δ
src/array/primitive/mod.rs 84.46% <0.00%> (-1.25%) ⬇️

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 39db6fb...0f70c8b. Read the comment docs.

@jorgecarleitao jorgecarleitao changed the title implement default for PrimitiveArray Implemented Default for PrimitiveArray Jun 15, 2022
@jorgecarleitao jorgecarleitao merged commit 2e10f4e into jorgecarleitao:main Jun 15, 2022
@jorgecarleitao jorgecarleitao added the enhancement An improvement to an existing feature label Jun 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement An improvement to an existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants