Open thvdveld opened 6 months ago
Attention: 9 lines
in your changes are missing coverage. Please review.
Comparison is base (
2e60fc2
) 79.70% compared to head (36c89d0
) 79.68%.
Files | Patch % | Lines |
---|---|---|
src/wire/ndiscoption.rs | 50.00% | 3 Missing :warning: |
src/wire/arp.rs | 66.66% | 1 Missing :warning: |
src/wire/ethernet.rs | 0.00% | 1 Missing :warning: |
src/wire/icmpv4.rs | 75.00% | 1 Missing :warning: |
src/wire/igmp.rs | 50.00% | 1 Missing :warning: |
src/wire/ipv4.rs | 75.00% | 1 Missing :warning: |
src/wire/udp.rs | 83.33% | 1 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
I was using
cargo bloat
and I saw duplicate functions in wire. After this PR, the duplicates were gone. Removing the generics in the parse and emit functions prevents monomorphization of these functions. Preventing monomorphization reduces the binary size of the library.cargo bloat --release --example server --filter smoltcp
: On main: 216.3KiB On this branch: 202.5KiBcargo bloat --release --example sixlowpan --filter smoltcp
: On main: 213.9KiB On this branch: 199.0KiBI know that this is for an example of
std
. However, the impact of code size will be smaller for embedded I suppose. The negative impact on user experience seems low since I didn't had to change much in the examples (only the ping example) and in the tests.