Replace if let Some(_) = foo with if foo.is_some()

This commit is contained in:
Aramis Razzaghipour 2021-10-03 23:51:30 +11:00
parent eff195852d
commit f29796da61
No known key found for this signature in database
GPG key ID: F788F7E990136003
6 changed files with 7 additions and 7 deletions

View file

@ -1119,7 +1119,7 @@ impl DefWithBody {
if let ast::Expr::RecordExpr(record_expr) =
&source_ptr.value.to_node(&root)
{
if let Some(_) = record_expr.record_expr_field_list() {
if record_expr.record_expr_field_list().is_some() {
acc.push(
MissingFields {
file: source_ptr.file_id,
@ -1143,7 +1143,7 @@ impl DefWithBody {
if let Some(expr) = source_ptr.value.as_ref().left() {
let root = source_ptr.file_syntax(db.upcast());
if let ast::Pat::RecordPat(record_pat) = expr.to_node(&root) {
if let Some(_) = record_pat.record_pat_field_list() {
if record_pat.record_pat_field_list().is_some() {
acc.push(
MissingFields {
file: source_ptr.file_id,