-
Notifications
You must be signed in to change notification settings - Fork 0
fix: wrong handling of insert return value #186
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
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #186 +/- ##
==========================================
+ Coverage 62.13% 62.17% +0.03%
==========================================
Files 36 36
Lines 1624 1631 +7
Branches 1624 1631 +7
==========================================
+ Hits 1009 1014 +5
- Misses 565 567 +2
Partials 50 50 ☔ View full report in Codecov by Sentry. |
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.
Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @nimrod-starkware)
crates/committer/src/patricia_merkle_tree/updated_skeleton_tree/tree.rs
line 76 at r1 (raw file):
}; let _ = updated_skeleton_tree
No need
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.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @nimrod-starkware)
crates/committer/src/patricia_merkle_tree/updated_skeleton_tree/tree.rs
line 79 at r1 (raw file):
.skeleton_tree .insert(NodeIndex::ROOT, new_node) .map(|_| panic!("Root node already exists in the updated skeleton tree"));
WDYT on this?
Suggestion:
updated_skeleton_tree
.skeleton_tree
.insert(NodeIndex::ROOT, new_node)
.map_or((), |_| {
unreachable!("Root node already exists in the updated skeleton tree")
})
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.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @nimrod-starkware)
crates/committer/src/patricia_merkle_tree/updated_skeleton_tree/tree.rs
line 79 at r1 (raw file):
Previously, TzahiTaub (Tzahi) wrote…
WDYT on this?
panic instead of unreachable
78f3339
to
80c0090
Compare
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.
Reviewable status:
complete! all files reviewed, all discussions resolved (waiting on @nimrod-starkware)
crates/committer/src/patricia_merkle_tree/updated_skeleton_tree/tree.rs
line 79 at r1 (raw file):
Previously, TzahiTaub (Tzahi) wrote…
panic instead of unreachable
done
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.
Reviewed 1 of 1 files at r2, all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @nimrod-starkware)
This change is