Lint unused_io_amount with is_ok and is_err

This commit is contained in:
Evan Typanski 2023-01-24 18:18:35 -05:00
parent 41b2a3d9fe
commit f9f75e0932
3 changed files with 47 additions and 7 deletions

View file

@ -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);
},
_ => (),