mozilla / mtu

Rust crate for obtaining the local network interface name and MTU towards a given IP address
https://crates.io/crates/mtu
Apache License 2.0
12 stars 2 forks source link

refactor: enforce immutability #4

Closed mxinden closed 1 month ago

codecov-commenter commented 1 month ago

Codecov Report

Attention: Patch coverage is 90.90909% with 4 lines in your changes missing coverage. Please review.

Project coverage is 94.55%. Comparing base (c732bd2) to head (0ef2797).

Files with missing lines Patch % Lines
src/lib.rs 90.90% 4 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #4 +/- ## ========================================== + Coverage 93.43% 94.55% +1.12% ========================================== Files 1 1 Lines 198 202 +4 ========================================== + Hits 185 191 +6 + Misses 13 11 -2 ```

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

larseggert commented 1 month ago

Might also want to do this for the Windows addr_table and if_table pointers?

mxinden commented 1 month ago

I updated the windows implementation to use early returns like the unix implementation does. Let me know if you prefer the immutability change only.