mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-01 03:03:40 +00:00
Amending use of Some with discarded value to use is_some
This commit is contained in:
parent
e67d2b2663
commit
9c73f7ff18
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user