Rust-clippy: FN if_let_redundant_pattern_matching Ok(_) => true, / Err(_) => false,

Created on 1 Jul 2018  路  1Comment  路  Source: rust-lang/rust-clippy

My code looked like this
rust match Command::new(&binary) .output() { Ok(_) => true, Err(_) => false, }
I would expect the if_let_redundant_pattern_matching lint to trigger here and suggest way more simple
rust Command::new(&binary) .output().is_ok()

clippy 0.0.211

L-enhancement good-first-issue hacktoberfest

Most helpful comment

I'd like to work on this!

>All comments

I'd like to work on this!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

0e4ef622 picture 0e4ef622  路  3Comments

matthiaskrgr picture matthiaskrgr  路  3Comments

phansch picture phansch  路  3Comments

f-fr picture f-fr  路  3Comments

phansch picture phansch  路  3Comments