Skip to content

Commit

Permalink
index: more cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
udoprog committed Aug 14, 2024
1 parent 1f55e9b commit 1428e6e
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions crates/rune/src/indexing/index.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1247,11 +1247,8 @@ fn expr_field_access(
) -> compile::Result<()> {
expr(idx, &mut ast.expr)?;

match &mut ast.expr_field {
ast::ExprField::Path(p) => {
path(idx, p)?;
}
ast::ExprField::LitNumber(..) => {}
if let ast::ExprField::Path(p) = &mut ast.expr_field {
path(idx, p)?;
}

Ok(())
Expand Down Expand Up @@ -1292,12 +1289,9 @@ fn expr_call(idx: &mut Indexer<'_, '_>, ast: &mut ast::ExprCall) -> compile::Res

#[instrument_ast(span = ast)]
fn expr_object(idx: &mut Indexer<'_, '_>, ast: &mut ast::ExprObject) -> compile::Result<()> {
match &mut ast.ident {
ast::ObjectIdent::Named(p) => {
// Not a variable use: Name of the object.
path(idx, p)?;
}
ast::ObjectIdent::Anonymous(..) => (),
if let ast::ObjectIdent::Named(p) = &mut ast.ident {
// Not a variable use: Name of the object.
path(idx, p)?;
}

for (assign, _) in &mut ast.assignments {
Expand Down

0 comments on commit 1428e6e

Please sign in to comment.