-
Notifications
You must be signed in to change notification settings - Fork 0
chore(skeleton): hide private field in EdgePathLength #177
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
chore(skeleton): hide private field in EdgePathLength #177
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #177 +/- ##
==========================================
+ Coverage 61.69% 61.74% +0.05%
==========================================
Files 36 36
Lines 1650 1660 +10
Branches 1650 1660 +10
==========================================
+ Hits 1018 1025 +7
- Misses 583 585 +2
- Partials 49 50 +1 ☔ 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 15 of 15 files at r1, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @TzahiTaub)
crates/committer/src/patricia_merkle_tree/test_utils.rs
line 27 at r1 (raw file):
.expect("String is too large"), ) .expect("Invalid length"),
this is a test util, right? unwrap is allowed and encouraged
Suggestion:
.unwrap()
crates/committer/src/patricia_merkle_tree/filled_tree/node_serde.rs
line 119 at r1 (raw file):
) .into(), length: EdgePathLength::new(value.0[EDGE_BYTES - 1]).expect("Illegal length"),
I wouldn't expect
here, this is deserialization code, the caller should handle this error...
WDYT? non-blocking
Suggestion:
length: EdgePathLength::new(value.0[EDGE_BYTES - 1])?
03f6b41
to
ef1f9dc
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: 14 of 16 files reviewed, 2 unresolved discussions (waiting on @dorimedini-starkware and @TzahiTaub)
crates/committer/src/patricia_merkle_tree/test_utils.rs
line 27 at r1 (raw file):
Previously, dorimedini-starkware wrote…
this is a test util, right? unwrap is allowed and encouraged
Tried that, getting error: used
unwrap()on a
Result value
from clippy.
crates/committer/src/patricia_merkle_tree/filled_tree/node_serde.rs
line 119 at r1 (raw file):
Previously, dorimedini-starkware wrote…
I wouldn't
expect
here, this is deserialization code, the caller should handle this error...
WDYT? non-blocking
I think there's a lot of work we need to do to propagate errors. Is this one OK specifically for where you pointed to?
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: 14 of 16 files reviewed, 2 unresolved discussions (waiting on @dorimedini-starkware and @TzahiTaub)
crates/committer/src/patricia_merkle_tree/test_utils.rs
line 27 at r1 (raw file):
Previously, TzahiTaub (Tzahi) wrote…
Tried that, getting
error: used
unwrap()on a
Resultvalue
from clippy.
Maybe becasue this module is used with feature="testing"
and not just test
?
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 2 of 2 files at r2, all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @TzahiTaub)
crates/committer/src/patricia_merkle_tree/test_utils.rs
line 27 at r1 (raw file):
Previously, TzahiTaub (Tzahi) wrote…
Maybe becasue this module is used with
feature="testing"
and not justtest
?
ah... is this needed from the cli area?
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 @TzahiTaub)
crates/committer/src/patricia_merkle_tree/test_utils.rs
line 27 at r1 (raw file):
Previously, dorimedini-starkware wrote…
ah... is this needed from the cli area?
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 @TzahiTaub)
crates/committer/src/patricia_merkle_tree/test_utils.rs
line 27 at r1 (raw file):
Previously, TzahiTaub (Tzahi) wrote…
You are right. feature="testing"
is not like a test.
However, You can use the snippet on your test function and clippy will allow use of unwrap
Code snippet:
#[allow(clippy::unwrap_used)]
ef1f9dc
to
4ddfc01
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.
Reviewed 4 of 4 files at r3, all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @TzahiTaub)
This change is