Skip to content

Increment version to 0.20.0 & resolve newer warnings#144

Merged
JulianSchmid merged 3 commits intomasterfrom
version-inc-20
Apr 20, 2026
Merged

Increment version to 0.20.0 & resolve newer warnings#144
JulianSchmid merged 3 commits intomasterfrom
version-inc-20

Conversation

@JulianSchmid
Copy link
Copy Markdown
Owner

@JulianSchmid JulianSchmid commented Apr 20, 2026

Summary by CodeRabbit

  • New Features

    • Added is_empty() method to ICMPv6 payload.
  • Bug Fixes

    • Fixed test assertion logic to properly validate headers.
    • Corrected payload serialization to ensure full data is written.
  • Refactor

    • Simplified code patterns and control flow structures.
    • Improved code formatting and clarity.
  • Chores

    • Bumped version to 0.20.0.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 20, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: acd60fbc-967b-461f-813a-5a3c6016dc9f

📥 Commits

Reviewing files that changed from the base of the PR and between 3e2b933 and 9417a6b.

📒 Files selected for processing (13)
  • etherparse/Cargo.toml
  • etherparse/examples/read_by_slicing.rs
  • etherparse/src/compositions_tests.rs
  • etherparse/src/net/net_slice.rs
  • etherparse/src/transport/icmpv4_slice.rs
  • etherparse/src/transport/icmpv6/icmpv6_payload/mod.rs
  • etherparse/src/transport/icmpv6/ndp_option/prefix_information.rs
  • etherparse/src/transport/icmpv6/ndp_option/prefix_information_option_slice.rs
  • etherparse/src/transport/icmpv6/ndp_option_read_error.rs
  • etherparse/src/transport/icmpv6/ndp_options_iterator.rs
  • etherparse/src/transport/icmpv6_slice.rs
  • etherparse/tests/transport/icmpv4.rs
  • etherparse_proptest_generators/Cargo.toml

📝 Walkthrough

Walkthrough

This is a minor version bump (0.19.0 → 0.20.0) introducing an is_empty() method to Icmpv6Payload, along with test fixes and widespread code style improvements using match guards, simplified conditionals, and refactoring across ICMPv4/v6 modules.

Changes

Cohort / File(s) Summary
Version Updates
etherparse/Cargo.toml, etherparse_proptest_generators/Cargo.toml
Incremented crate versions from 0.19.0 to 0.20.0 in both manifests.
ICMPv6 Payload Enhancement
etherparse/src/transport/icmpv6/icmpv6_payload/mod.rs
Added public is_empty() method returning whether serialized payload length is zero, with corresponding test covering RouterSolicitation and other payload variants.
Code Style & Refactoring
etherparse/src/transport/icmpv4_slice.rs, etherparse/src/transport/icmpv6_slice.rs
Refactored nested if statements into match guard patterns for timestamp/echo/routing/neighbor/redirect message type checks, reducing nesting without changing logic.
ICMPv6 Utility Refactoring
etherparse/src/transport/icmpv6/ndp_option/..., etherparse/src/transport/icmpv6/ndp_options_iterator.rs, etherparse/src/transport/icmpv6/ndp_option_read_error.rs
Simplified header validation expressions, reformatted error handling in try_into() chains, replaced closure-based error conversions with direct ok_or() calls, and adjusted variant formatting without changing semantics.
Example & Test Improvements
etherparse/examples/read_by_slicing.rs, etherparse/src/compositions_tests.rs, etherparse/tests/transport/icmpv4.rs
Simplified conditional checks from false == expr.is_empty() to !expr.is_empty(); fixed test assertions to compare correct values (self.net vs actual.net) and payload writes using write_all(); removed unnecessary cloning in test loop.
Module Re-export Update
etherparse/src/net/net_slice.rs
Updated InternetSlice re-export from pub use NetSlice to pub use self::NetSlice, making import path explicit.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Poem

🐰 A hop and a skip through the code we go,
New methods bloom where the tests can grow,
Match guards sharpen the logic's bite,
Cleaner imports shine in the light,
Version twenty brings order and might! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately captures the two main objectives of the PR: incrementing the version to 0.20.0 and resolving newer warnings through code refactoring.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch version-inc-20

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@JulianSchmid JulianSchmid merged commit c38f3bf into master Apr 20, 2026
11 checks passed
@JulianSchmid JulianSchmid deleted the version-inc-20 branch April 20, 2026 04:30
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 0.00%. Comparing base (3e2b933) to head (9417a6b).
⚠️ Report is 4 commits behind head on master.

Additional details and impacted files
@@      Coverage Diff      @@
##   master   #144   +/-   ##
=============================
=============================

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant