imperio , 4 months ago Added a new rust clippy lint which detects .get().is_some() on std map types: let s: HashSet<String> = HashSet::new();<br></br>if s.get("a").is_some() {<br></br> Should be written: if s.contains("a") {<br></br> PR: https://github.com/rust-lang/rust-clippy/pull/12339 #rust #rustlang
Added a new rust clippy lint which detects .get().is_some() on std map types:
.get().is_some()
let s: HashSet<String> = HashSet::new();<br></br>if s.get("a").is_some() {<br></br>
Should be written:
if s.contains("a") {<br></br>
PR: https://github.com/rust-lang/rust-clippy/pull/12339
#rust #rustlang