libsyntax: Consolidate branch to benefit from exhaustive checking instead of unwrapping
This commit is contained in:
parent
998914f5da
commit
1a235274a1
1 changed files with 6 additions and 6 deletions
|
@ -3304,13 +3304,13 @@ impl<'a> Parser<'a> {
|
||||||
pat = PatEnum(path, Some(args));
|
pat = PatEnum(path, Some(args));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_ if qself.is_some() => {
|
|
||||||
// Parse qualified path
|
|
||||||
pat = PatQPath(qself.unwrap(), path);
|
|
||||||
}
|
|
||||||
_ => {
|
_ => {
|
||||||
|
pat = match qself {
|
||||||
|
// Parse qualified path
|
||||||
|
Some(qself) => PatQPath(qself, path),
|
||||||
// Parse nullary enum
|
// Parse nullary enum
|
||||||
pat = PatEnum(path, Some(vec![]));
|
None => PatEnum(path, Some(vec![]))
|
||||||
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue