From a665edc421c536cfe82604fb7d91fc23272f69f6 Mon Sep 17 00:00:00 2001 From: Noah <33094578+coolreader18@users.noreply.github.com> Date: Sat, 17 Oct 2020 20:05:09 -0500 Subject: [PATCH] Fix clippy lints --- bytecode/src/bytecode.rs | 6 +++--- compiler/src/compile.rs | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/bytecode/src/bytecode.rs b/bytecode/src/bytecode.rs index c71a86239..fa5a8b66b 100644 --- a/bytecode/src/bytecode.rs +++ b/bytecode/src/bytecode.rs @@ -625,14 +625,14 @@ impl CodeObject { instructions: self.instructions.clone(), label_map: self.label_map.clone(), locations: self.locations.clone(), - flags: self.flags.clone(), - posonlyarg_count: self.posonlyarg_count.clone(), + flags: self.flags, + posonlyarg_count: self.posonlyarg_count, arg_names: self.arg_names.clone(), varargs_name: self.varargs_name.clone(), kwonlyarg_names: self.kwonlyarg_names.clone(), varkeywords_name: self.varkeywords_name.clone(), source_path: self.source_path.clone(), - first_line_number: self.first_line_number.clone(), + first_line_number: self.first_line_number, obj_name: self.obj_name.clone(), } } diff --git a/compiler/src/compile.rs b/compiler/src/compile.rs index d395bc073..fde8d05bc 100644 --- a/compiler/src/compile.rs +++ b/compiler/src/compile.rs @@ -170,7 +170,7 @@ impl Compiler { } fn push_output(&mut self, code: CodeObject) { - self.output_stack.push(code.into()); + self.output_stack.push(code); } fn push_new_code_object(&mut self, obj_name: String) { @@ -189,7 +189,7 @@ impl Compiler { } fn pop_code_object(&mut self) -> CodeObject { - self.output_stack.pop().unwrap().into() + self.output_stack.pop().unwrap() } fn compile_program(