aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEdvard Thörnros <edvard.thornros@gmail.com>2021-02-01 10:47:55 +0100
committerEdvard Thörnros <edvard.thornros@gmail.com>2021-02-01 10:47:55 +0100
commit23866f117ace6b4e0b2cd3c611cdb982cf20e4ca (patch)
tree7466e0e51e8786cbf66875b70cfbf5814acce2ab /src
parentae48928ebdaf809c9191067cd3226e1a1a2b67d6 (diff)
downloadsylt-23866f117ace6b4e0b2cd3c611cdb982cf20e4ca.tar.gz
fix compiler warning
Diffstat (limited to 'src')
-rw-r--r--src/compiler.rs3
-rw-r--r--src/vm.rs6
2 files changed, 2 insertions, 7 deletions
diff --git a/src/compiler.rs b/src/compiler.rs
index 79d14b6..b76e1b2 100644
--- a/src/compiler.rs
+++ b/src/compiler.rs
@@ -526,7 +526,8 @@ impl Compiler {
let mut function_block = Block::new(&name, &self.current_file, self.line());
let block_id = self.blocks.len();
- self.blocks.push(Rc::new(RefCell::new(Block::new(&name, &self.current_file, self.line()))));
+ let temp_block = Block::new(&name, &self.current_file, self.line());
+ self.blocks.push(Rc::new(RefCell::new(temp_block)));
let _ret = push_frame!(self, function_block, {
loop {
diff --git a/src/vm.rs b/src/vm.rs
index dd233dc..ea15b5d 100644
--- a/src/vm.rs
+++ b/src/vm.rs
@@ -119,12 +119,6 @@ impl VM {
self.stack.push(value)
}
- fn pop_twice(&mut self) -> (Value, Value) {
- let (a, b) = (self.stack.remove(self.stack.len() - 1),
- self.stack.remove(self.stack.len() - 1));
- (b, a) // this matches the order they were on the stack
- }
-
fn _peek_up(&self, amount: usize) -> Option<&Value> {
self.stack.get(self.stack.len() - amount)
}