-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
7.0.x: handful of clippy cleanups - v1 #12618
7.0.x: handful of clippy cleanups - v1 #12618
Conversation
jasonish
commented
Feb 18, 2025
- mqtt: always use 0x notation for hex in tests
- rust: allow vec_init_then_push in tests
- rust: fix assertions_on_constants for assert!(false)
- rust: fix single_binding
- rust: fix assertions_on_constants for assert!(true)
- dns: fix clippy lint warnings
- rust: allow clippy::unused_unit for tests that use the test macro
- dns: refactor tests to avoid assert!(false)
Fixes clippy lint for zero_prefixed_literal.
To supress the clippy lint in tests.
using panic! instead with a string message (cherry picked from commit a8199bf)
error: this match could be written as a `let` statement --> src/nfs/nfs3_records.rs:747:9 | 747 | / match result { 748 | | (r, request) => { 749 | | assert_eq!(r.len(), 0); 750 | | assert_eq!(request.handle, expected_handle); 751 | | assert_eq!(request.name_vec, br#"bln"#); 752 | | } 753 | | } | |_________^ (cherry picked from commit 259cdf1)
Which will be optimized away by the compiler (cherry picked from commit c49463c)
Fix vector lint issues: - same_item_push - vec_init_then_push (cherry picked from commit 2c0d3b8)
The cause of the issue comes from the macro, which is provided by a crate. Bust just to allow this for now.
Mostly just unwrap instead of match as unwrap provides good context. And replace a few assert!(false) with a descriptive panic.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main-7.0.x #12618 +/- ##
==============================================
+ Coverage 83.27% 83.29% +0.02%
==============================================
Files 922 922
Lines 261201 261076 -125
==============================================
- Hits 217504 217458 -46
+ Misses 43697 43618 -79
Flags with carried forward coverage won't be shown. Click here to find out more. |
Information: ERROR: QA failed on SURI_TLPW2_autofp_suri_time. ERROR: QA failed on SURI_TLPR1_suri_time.
Pipeline 24777 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀
Information: ERROR: QA failed on SURI_TLPW2_autofp_suri_time.
Pipeline 24782 |
Merged in #12630, thanks! |