diff --git a/src/compile.rs b/src/compile.rs index 0d65bac..db33c5b 100644 --- a/src/compile.rs +++ b/src/compile.rs @@ -348,7 +348,7 @@ impl Compiler { self.emit(Instruction::PrintExpr); } } else { - self.compile_statement(&statement)?; + self.compile_statement(statement)?; } } @@ -470,7 +470,7 @@ impl Compiler { // we do this here because `from __future__` still executes that `from` statement at runtime, // we still need to compile the ImportFrom down below ImportFrom { module, names, .. } if module.as_deref() == Some("__future__") => { - self.compile_future_features(&names)? + self.compile_future_features(names)? } // if we find any other statement, stop accepting future statements _ => self.done_with_future_stmts = true, @@ -1068,7 +1068,7 @@ impl Compiler { self.emit_constant(ConstantData::Str { value: self.mangle(&arg.node.arg).into_owned(), }); - self.compile_expression(&annotation)?; + self.compile_expression(annotation)?; num_annotations += 1; } } @@ -1159,7 +1159,7 @@ impl Compiler { orelse, finalbody, .. - } => self.find_ann(&body) || self.find_ann(orelse) || self.find_ann(finalbody), + } => self.find_ann(body) || self.find_ann(orelse) || self.find_ann(finalbody), _ => false, }; if res { diff --git a/src/symboltable.rs b/src/symboltable.rs index 8eaa095..10c13ba 100644 --- a/src/symboltable.rs +++ b/src/symboltable.rs @@ -617,7 +617,7 @@ impl SymbolTableBuilder { fn scan_parameter_annotation(&mut self, parameter: &ast::Arg) -> SymbolTableResult { if let Some(annotation) = ¶meter.node.annotation { - self.scan_expression(&annotation, ExpressionContext::Load)?; + self.scan_expression(annotation, ExpressionContext::Load)?; } Ok(()) } @@ -1075,7 +1075,7 @@ impl SymbolTableBuilder { // Evaluate eventual default parameters: self.scan_expressions(&args.defaults, ExpressionContext::Load)?; for expression in args.kw_defaults.iter().flatten() { - self.scan_expression(&expression, ExpressionContext::Load)?; + self.scan_expression(expression, ExpressionContext::Load)?; } // Annotations are scanned in outer scope: