mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-26 20:09:19 +00:00
Replace if let Some(_) = foo
with if foo.is_some()
This commit is contained in:
parent
eff195852d
commit
f29796da61
6 changed files with 7 additions and 7 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue