eclipse-iceoryx / iceoryx2

Eclipse iceoryx2™ - true zero-copy inter-process-communication in pure Rust
https://iceoryx.io
Apache License 2.0
1.03k stars 40 forks source link

[#430] Fix clippy single match warning in package iceoryx2 #431

Closed xieyuschen closed 1 month ago

xieyuschen commented 1 month ago

Notes for Reviewer

This change is done by calling cargo clippy --fix --lib -p iceoryx2 I'm still learning about the code of iceoryx2, so I tried to improve some of them(trivial but nice to have) during the process.

Pre-Review Checklist for the PR Author

  1. [X] Add sensible notes for the reviewer
  2. [X] PR title is short, expressive and meaningful
  3. [X] Relevant issues are linked in the References section
  4. [X] Every source code file has a copyright header with SPDX-License-Identifier: Apache-2.0 OR MIT
  5. [X] Branch follows the naming format (iox2-123-introduce-posix-ipc-example)
  6. [X] Commits messages are according to this guideline
    • [X] Commit messages have the issue ID ([#123] Add posix ipc example)
    • [X] Commit author matches Eclipse Contributor Agreement (and ECA is signed)
  7. [X] Tests follow the best practice for testing
  8. [X] Changelog updated in the unreleased section including API breaking changes
  9. [x] Assign PR to reviewer
  10. [X] All checks have passed (except task-list-completed)

Checklist for the PR Reviewer

Post-review Checklist for the PR Author

  1. [x] All open points are addressed and tracked via issues

References

Relates to #430

codecov[bot] commented 1 month ago

Codecov Report

Attention: Patch coverage is 58.97436% with 16 lines in your changes missing coverage. Please review.

Project coverage is 78.95%. Comparing base (6d25b61) to head (e6ba9cc). Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
iceoryx2/src/port/publisher.rs 48.27% 15 Missing :warning:
iceoryx2/src/port/notifier.rs 66.66% 1 Missing :warning:
Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/eclipse-iceoryx/iceoryx2/pull/431/graphs/tree.svg?width=650&height=150&src=pr&token=FN3YFXTJCI&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=eclipse-iceoryx)](https://app.codecov.io/gh/eclipse-iceoryx/iceoryx2/pull/431?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=eclipse-iceoryx) ```diff @@ Coverage Diff @@ ## main #431 +/- ## ========================================== + Coverage 78.93% 78.95% +0.02% ========================================== Files 195 195 Lines 22840 22836 -4 ========================================== + Hits 18029 18031 +2 + Misses 4811 4805 -6 ``` | [Files with missing lines](https://app.codecov.io/gh/eclipse-iceoryx/iceoryx2/pull/431?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=eclipse-iceoryx) | Coverage Δ | | |---|---|---| | [iceoryx2/src/node/mod.rs](https://app.codecov.io/gh/eclipse-iceoryx/iceoryx2/pull/431?src=pr&el=tree&filepath=iceoryx2%2Fsrc%2Fnode%2Fmod.rs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=eclipse-iceoryx#diff-aWNlb3J5eDIvc3JjL25vZGUvbW9kLnJz) | `70.99% <ø> (ø)` | | | [iceoryx2/src/port/subscriber.rs](https://app.codecov.io/gh/eclipse-iceoryx/iceoryx2/pull/431?src=pr&el=tree&filepath=iceoryx2%2Fsrc%2Fport%2Fsubscriber.rs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=eclipse-iceoryx#diff-aWNlb3J5eDIvc3JjL3BvcnQvc3Vic2NyaWJlci5ycw==) | `92.93% <100.00%> (-0.06%)` | :arrow_down: | | [iceoryx2/src/port/notifier.rs](https://app.codecov.io/gh/eclipse-iceoryx/iceoryx2/pull/431?src=pr&el=tree&filepath=iceoryx2%2Fsrc%2Fport%2Fnotifier.rs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=eclipse-iceoryx#diff-aWNlb3J5eDIvc3JjL3BvcnQvbm90aWZpZXIucnM=) | `90.05% <66.66%> (ø)` | | | [iceoryx2/src/port/publisher.rs](https://app.codecov.io/gh/eclipse-iceoryx/iceoryx2/pull/431?src=pr&el=tree&filepath=iceoryx2%2Fsrc%2Fport%2Fpublisher.rs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=eclipse-iceoryx#diff-aWNlb3J5eDIvc3JjL3BvcnQvcHVibGlzaGVyLnJz) | `84.94% <48.27%> (-0.06%)` | :arrow_down: | ... and [3 files with indirect coverage changes](https://app.codecov.io/gh/eclipse-iceoryx/iceoryx2/pull/431/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=eclipse-iceoryx)