Skip to content

Commit

Permalink
Amending use of Some with discarded value to use is_some
Browse files Browse the repository at this point in the history
  • Loading branch information
Donald Robertson committed Jun 6, 2018
1 parent e67d2b2 commit 9c73f7f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion clippy_lints/src/methods.rs
Expand Up @@ -997,7 +997,7 @@ fn lint_expect_fun_call(cx: &LateContext, expr: &hir::Expr, method_span: Span, n
fn extract_format_args(arg: &hir::Expr) -> Option<&hir::HirVec<hir::Expr>> {
if let hir::ExprAddrOf(_, ref addr_of) = arg.node {
if let hir::ExprCall(ref inner_fun, ref inner_args) = addr_of.node {
if let Some(_) = is_expn_of(inner_fun.span, "format") {
if is_expn_of(inner_fun.span, "format").is_some() {
if inner_args.len() == 1 {
if let hir::ExprCall(_, ref format_args) = inner_args[0].node {
return Some(format_args);
Expand Down

0 comments on commit 9c73f7f

Please sign in to comment.