Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/syntax/src/ast/edit_in_place.rs')
| -rw-r--r-- | crates/syntax/src/ast/edit_in_place.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/syntax/src/ast/edit_in_place.rs b/crates/syntax/src/ast/edit_in_place.rs index c20b81d7e9..d304e215b4 100644 --- a/crates/syntax/src/ast/edit_in_place.rs +++ b/crates/syntax/src/ast/edit_in_place.rs @@ -455,7 +455,7 @@ impl ast::RecordExprField { /// This will either replace the initializer, or in the case that this is a shorthand convert /// the initializer into the name ref and insert the expr as the new initializer. pub fn replace_expr(&self, expr: ast::Expr) { - if let Some(_) = self.name_ref() { + if self.name_ref().is_some() { match self.expr() { Some(prev) => ted::replace(prev.syntax(), expr.syntax()), None => ted::append_child(self.syntax(), expr.syntax()), |