Lint unused_io_amount with is_ok and is_err
This commit is contained in:
parent
41b2a3d9fe
commit
f9f75e0932
3 changed files with 47 additions and 7 deletions
|
|
@ -65,7 +65,7 @@ impl<'tcx> LateLintPass<'tcx> for UnusedIoAmount {
|
|||
}
|
||||
},
|
||||
hir::ExprKind::MethodCall(path, arg_0, ..) => match path.ident.as_str() {
|
||||
"expect" | "unwrap" | "unwrap_or" | "unwrap_or_else" => {
|
||||
"expect" | "unwrap" | "unwrap_or" | "unwrap_or_else" | "is_ok" | "is_err" => {
|
||||
check_map_error(cx, arg_0, expr);
|
||||
},
|
||||
_ => (),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue