Skip to content

Commit

Permalink
Simplify match expr
Browse files Browse the repository at this point in the history
  • Loading branch information
VirrageS committed Dec 23, 2019
1 parent 2168c0b commit 7b91ef8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/librustc_resolve/late/diagnostics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -321,8 +321,8 @@ impl<'a> LateResolutionVisitor<'a, '_> {
fn call_has_self_arg(&self, source: PathSource<'_>) -> Option<(Span, Option<Span>)> {
let mut has_self_arg = None;
if let PathSource::Expr(parent) = source {
match &parent.map(|p| &p.kind) {
Some(ExprKind::Call(_, args)) if args.len() > 0 => {
match &parent?.kind {
ExprKind::Call(_, args) if args.len() > 0 => {
let mut expr_kind = &args[0].kind;
loop {
match expr_kind {
Expand Down

0 comments on commit 7b91ef8

Please sign in to comment.