Closed japaric closed 1 year ago
:exclamation: No coverage uploaded for pull request base (
main@6d40763
). Click here to learn what that means. Patch coverage: 0.00% of modified lines in pull request are covered.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Number of dependencies and binary size impact report
Metric | main | PR #758 | Delta |
---|---|---|---|
Direct dependencies | 3 | 3 | - |
Total dependencies | 4 | 4 | - |
Binary size | 1023.2 KiB | 1023.5 KiB | - |
Text size | 594.9 KiB | 594.9 KiB | - |
I had trouble reading the original version and thought that the
curr_str
passed intoCStr::from_ptr
was not checked for null-ness but that was done inwhile
condition -- the not very visible dereferencing operator there through me off.The new version should hopefully make it clearer that a
NonNull
pointer is being passed intoCStr::from_ptr
. (Of course, it'd be even better ifCStr::from_ptr
signature wasfn(NonNull<u8>)
but we can't change the libstd API.) It also makes the dereferencing more explicit using theread
method.