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

[storage] Implement Drop for Pack #600

Merged
merged 4 commits into from
Dec 2, 2020
Merged

Conversation

cmichi
Copy link
Collaborator

@cmichi cmichi commented Nov 30, 2020

Closes #581.

@cmichi cmichi requested a review from Robbepop November 30, 2020 04:20
@cmichi cmichi force-pushed the cmichi-implement-drop-for-pack branch from dc9c2c2 to 4ee0738 Compare November 30, 2020 04:49
@cmichi cmichi force-pushed the cmichi-implement-drop-for-pack branch from 4ee0738 to 7e40231 Compare November 30, 2020 05:08
@codecov-io
Copy link

codecov-io commented Nov 30, 2020

Codecov Report

Merging #600 (ad010af) into master (2100fa7) will increase coverage by 15.18%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##           master     #600       +/-   ##
===========================================
+ Coverage   67.26%   82.44%   +15.18%     
===========================================
  Files         155      155               
  Lines        6925     6939       +14     
===========================================
+ Hits         4658     5721     +1063     
+ Misses       2267     1218     -1049     
Impacted Files Coverage Δ
...rates/storage/src/collections/binary_heap/tests.rs 94.00% <ø> (ø)
crates/storage/src/collections/hashmap/tests.rs 100.00% <ø> (ø)
crates/storage/src/collections/stash/tests.rs 100.00% <ø> (ø)
crates/primitives/src/key_ptr.rs 100.00% <100.00%> (ø)
crates/storage/src/pack.rs 100.00% <100.00%> (ø)
crates/lang/ir/src/ir/attrs.rs 85.58% <0.00%> (+0.93%) ⬆️
crates/storage/src/collections/stash/storage.rs 59.45% <0.00%> (+5.40%) ⬆️
...ates/storage/src/collections/hashmap/fuzz_tests.rs 100.00% <0.00%> (+5.47%) ⬆️
crates/env/src/engine/off_chain/db/events.rs 16.12% <0.00%> (+6.45%) ⬆️
crates/lang/ir/src/ir/trait_def.rs 92.82% <0.00%> (+9.74%) ⬆️
... and 28 more

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 2100fa7...7a6c18e. Read the comment docs.

Copy link
Collaborator

@Robbepop Robbepop left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All in all nice fix and the impl mostly looks good, however, I really wonder about the BinaryHeap change.

crates/primitives/src/key_ptr.rs Outdated Show resolved Hide resolved
crates/storage/src/collections/binary_heap/mod.rs Outdated Show resolved Hide resolved
crates/storage/src/pack.rs Outdated Show resolved Hide resolved
crates/storage/src/pack.rs Outdated Show resolved Hide resolved
crates/storage/src/pack.rs Outdated Show resolved Hide resolved
crates/storage/src/pack.rs Outdated Show resolved Hide resolved
@cmichi cmichi merged commit bad0c88 into master Dec 2, 2020
@cmichi cmichi deleted the cmichi-implement-drop-for-pack branch December 2, 2020 19:30
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.

Drop does not clear up properly for BinaryHeap/HashMap/Stash
3 participants