-
-
Notifications
You must be signed in to change notification settings - Fork 105
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
Cleanup #69
Cleanup #69
Conversation
Codecov Report
@@ Coverage Diff @@
## main #69 +/- ##
==========================================
+ Coverage 76.71% 77.30% +0.59%
==========================================
Files 16 16
Lines 3504 3494 -10
==========================================
+ Hits 2688 2701 +13
+ Misses 816 793 -23
Continue to review full report at Codecov.
|
CI fails because of ring (rust-lang/rust#95267) |
Thanks for the cleanup! I'll take a look once nightly gets fixed (sounds like early next week). My main concern about fixing clippy lints is that newer versions of clippy may suggest changes involving newer language features that break compatibility with the MSRV 1.45.0. As long as CI passes, the changes should be fine though. Also, feel free to add |
error: use of `unwrap_or` followed by a function call
--> src/http_utils.rs:17:31
|
17 | ct[..ct.find(';').unwrap_or(ct.len())].to_lowercase() == expected_essence.to_lowercase()
| ^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| ct.len())`
|
= note: `-D clippy::or-fun-call` implied by `-D warnings`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call We now have the situation that the clippy version from MSVC does not recognize that warning: unnecessary closure used to substitute value for `Option::None`
--> src/http_utils.rs:17:18
|
17 | ct[..ct.find(';').unwrap_or_else(|| ct.len())].to_lowercase()
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `unwrap_or` instead: `ct.find(';').unwrap_or(ct.len())`
|
= note: `#[warn(clippy::unnecessary_lazy_evaluations)]` on by default
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations Using |
Related to rust-lang/rust-clippy#6943 |
I think let's go with |
thanks! |
I wanted to contribute to this crate (#68) and while attempting to do so, rust-analyzer (with clippy) complaint. I thought, I could use this chance to fix the clippy errors and do some clean up.