- if_let_chain! {[ //begin checking variables
- let ExprMatch(ref op, ref body, ref source) = expr.node, //test if expr is a match
- let MatchSource::IfLetDesugar { .. } = *source, //test if it is an If Let
- let ExprMethodCall(_, _, ref result_types) = op.node, //check is expr.ok() has type Result<T,E>.ok()
- let PatKind::TupleStruct(QPath::Resolved(_, ref x), ref y, _) = body[0].pats[0].node, //get operation
- method_chain_args(op, &["ok"]).is_some() //test to see if using ok() methoduse std::marker::Sized;
+ if_chain! { //begin checking variables
+ if let ExprKind::Match(ref op, ref body, ref source) = expr.node; //test if expr is a match
+ if let MatchSource::IfLetDesugar { .. } = *source; //test if it is an If Let
+ if let ExprKind::MethodCall(_, _, ref result_types) = op.node; //check is expr.ok() has type Result<T,E>.ok()
+ if let PatKind::TupleStruct(QPath::Resolved(_, ref x), ref y, _) = body[0].pats[0].node; //get operation
+ if method_chain_args(op, &["ok"]).is_some(); //test to see if using ok() methoduse std::marker::Sized;