Closed cwlittle closed 3 years ago
Although, it looks like the result that triggers a clippy failure is only an error. In our case, it was the drop rather than ManuallyDrop::drop that wasn't dropping the inner value. Clippy is passing with just warnings. We could leave these safety blocks until we revisit documentation. In any case, keeping clippy clean in merk will be much easier now that we have less of a wall to deal with.
Also removed the unsafe
markers from those 2 methods, since it was overkill anyway. It was just there to mark that modifying the tree could result in a weird state if you forget to finalize it (e.g. recomputing hashes), but the tree API is a low-level internal API so I don't think we have to make that so explicit.
Merging #53 (9672627) into develop (6fa0e16) will increase coverage by
0.05%
. The diff coverage is90.47%
.
@@ Coverage Diff @@
## develop #53 +/- ##
===========================================
+ Coverage 91.47% 91.53% +0.05%
===========================================
Files 24 24
Lines 3157 3141 -16
===========================================
- Hits 2888 2875 -13
+ Misses 269 266 -3
Impacted Files | Coverage Δ | |
---|---|---|
src/test_utils/mod.rs | 59.75% <50.00%> (ø) |
|
src/merk/mod.rs | 89.09% <75.00%> (+0.27%) |
:arrow_up: |
src/proofs/query/mod.rs | 98.62% <85.71%> (+0.26%) |
:arrow_up: |
src/merk/chunks.rs | 98.58% <100.00%> (ø) |
|
src/merk/restore.rs | 92.85% <100.00%> (ø) |
|
src/proofs/chunk.rs | 96.29% <100.00%> (-0.04%) |
:arrow_down: |
src/proofs/encoding.rs | 98.38% <100.00%> (-0.03%) |
:arrow_down: |
src/proofs/query/map.rs | 97.93% <100.00%> (ø) |
|
src/proofs/tree.rs | 94.80% <100.00%> (ø) |
|
src/test_utils/crash_merk.rs | 100.00% <100.00%> (ø) |
|
... and 7 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 6fa0e16...9672627. Read the comment docs.
@mappum I'll need a bit of help getting the safety sections written out for detach and detach_expect in src/tree/walk/mod.rs. I tried to remove the unsafe in the function definition to see the location of the unsafe lines in detach to get a bit more context, but it looks like this is unsafe for some reason beyond that. It's still a bit arcane to me.