smoltcp-rs / smoltcp

a smol tcp/ip stack
BSD Zero Clause License
3.64k stars 404 forks source link

NDISC: option parsing is the same for all NDISC types #878

Closed thvdveld closed 6 months ago

thvdveld commented 6 months ago

This removes the foreach_option function and instead tries to parse all options. Since the way options are parsed is the same for all messages, this is a bit more efficient in terms of code size.

Running cargo bloat --release --example server --filter smoltcp: On main: 216.3KiB On this branch: 213.9KiB

Running cargo bloat --release --example sixlowpan --filter smoltcp: On main: 213.9KiB On this branch: 211.4KiB

codecov[bot] commented 6 months ago

Codecov Report

Attention: 15 lines in your changes are missing coverage. Please review.

Comparison is base (8a86a5a) 79.74% compared to head (2d862b2) 79.76%.

Files Patch % Lines
src/wire/ndisc.rs 68.08% 15 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #878 +/- ## ========================================== + Coverage 79.74% 79.76% +0.01% ========================================== Files 78 78 Lines 28131 28092 -39 ========================================== - Hits 22433 22407 -26 + Misses 5698 5685 -13 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.