diff options
| author | Laurenz <laurmaedje@gmail.com> | 2021-11-07 23:31:42 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2021-11-08 11:52:09 +0100 |
| commit | 75fffc1f9b6ef8bf258b2b1845a4ba74a0f5f2c1 (patch) | |
| tree | e8c841d9d9323fc3cff0f584f3267743e809dd25 /src/parse | |
| parent | 95866d5fc9ae89a23c5754193c7de5d4fe4873b1 (diff) | |
Fine-grained capturing
Diffstat (limited to 'src/parse')
| -rw-r--r-- | src/parse/mod.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/parse/mod.rs b/src/parse/mod.rs index 505482ca..78e4f896 100644 --- a/src/parse/mod.rs +++ b/src/parse/mod.rs @@ -418,7 +418,7 @@ fn item(p: &mut Parser) -> ParseResult<NodeKind> { if p.at(&NodeKind::Colon) { marker.perform(p, NodeKind::Named, |p| { - if matches!(marker.peek(p).unwrap().kind(), &NodeKind::Ident(_)) { + if let Some(NodeKind::Ident(_)) = marker.peek(p).map(|c| c.kind()) { p.eat(); expr(p) } else { |
