summaryrefslogtreecommitdiff
path: root/src/syntax/ast.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/syntax/ast.rs')
-rw-r--r--src/syntax/ast.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/syntax/ast.rs b/src/syntax/ast.rs
index 06e41fa0..61b8f0e6 100644
--- a/src/syntax/ast.rs
+++ b/src/syntax/ast.rs
@@ -1471,7 +1471,11 @@ impl ForPattern {
pub fn key(&self) -> Option<Ident> {
let mut children = self.0.children().filter_map(SyntaxNode::cast);
let key = children.next();
- if children.next().is_some() { key } else { None }
+ if children.next().is_some() {
+ key
+ } else {
+ None
+ }
}
/// The value part of the pattern.