Skip to content

Commit 9c73f7f

Browse files
author
Donald Robertson
committed
Amending use of Some with discarded value to use is_some
1 parent e67d2b2 commit 9c73f7f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clippy_lints/src/methods.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -997,7 +997,7 @@ fn lint_expect_fun_call(cx: &LateContext, expr: &hir::Expr, method_span: Span, n
997997
fn extract_format_args(arg: &hir::Expr) -> Option<&hir::HirVec<hir::Expr>> {
998998
if let hir::ExprAddrOf(_, ref addr_of) = arg.node {
999999
if let hir::ExprCall(ref inner_fun, ref inner_args) = addr_of.node {
1000-
if let Some(_) = is_expn_of(inner_fun.span, "format") {
1000+
if is_expn_of(inner_fun.span, "format").is_some() {
10011001
if inner_args.len() == 1 {
10021002
if let hir::ExprCall(_, ref format_args) = inner_args[0].node {
10031003
return Some(format_args);

0 commit comments

Comments
 (0)