From 340d90a3f9502bfcb259b1ddee0dbaf0fd50ffc4 Mon Sep 17 00:00:00 2001 From: Daniel Watkins Date: Fri, 10 Aug 2018 15:56:28 -0400 Subject: [PATCH] Refactor push_code_object to push_new_code_object The argument wasn't being used by the current implementation, so drop it. --- vm/src/compile.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vm/src/compile.rs b/vm/src/compile.rs index 7bc4b8509..e49fb6969 100644 --- a/vm/src/compile.rs +++ b/vm/src/compile.rs @@ -16,7 +16,7 @@ struct Compiler { pub fn compile(vm: &mut VirtualMachine, source: &String, mode: Mode) -> Result { let mut compiler = Compiler::new(); - compiler.push_code_object(CodeObject::new(Vec::new())); + compiler.push_new_code_object(); match mode { Mode::Exec => match parser::parse_program(source) { Ok(ast) => { @@ -77,7 +77,7 @@ impl Compiler { } } - fn push_code_object(&mut self, code_object: CodeObject) { + fn push_new_code_object(&mut self) { self.code_object_stack.push(CodeObject::new(Vec::new())); }