You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
error: redundant pattern matching, consider using `is_ok()`
--> build.rs:43:12
|
43 | if let Ok(_) = std::env::var("DOCS_RS") {
| -------^^^^^--------------------------- help: try this: `if std::env::var("DOCS_RS").is_ok()`
|
= note: `-D clippy::redundant-pattern-matching` implied by `-D warnings`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching
I'm not a big fan of this lint cause I prefer the if let Ok(_) style but that still a default lint of clippy for now so maybe doc should reflect clippy advice.
if std::env::var("DOCS_RS").is_ok(){// ... your code here ...}
The text was updated successfully, but these errors were encountered:
Detecting Docs.rs give a code example:
This generate a lint from clippy
redundant_pattern_matching
:I'm not a big fan of this lint cause I prefer the
if let Ok(_)
style but that still a default lint of clippy for now so maybe doc should reflect clippy advice.The text was updated successfully, but these errors were encountered: