From e8b0732f5e790101993e33c56aefe03932b109e3 Mon Sep 17 00:00:00 2001 From: Jeong Yunwon Date: Sun, 17 Apr 2022 04:01:35 +0900 Subject: [PATCH] remove warning from jit test --- jit/tests/common.rs | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/jit/tests/common.rs b/jit/tests/common.rs index ad5f5e83a..289093f84 100644 --- a/jit/tests/common.rs +++ b/jit/tests/common.rs @@ -1,12 +1,10 @@ -use std::collections::HashMap; - use rustpython_bytecode::{CodeObject, ConstantData, Instruction}; use rustpython_jit::{CompiledCode, JitType}; +use std::collections::HashMap; #[derive(Debug, Clone)] pub struct Function { code: Box, - name: String, annotations: HashMap, } @@ -107,7 +105,7 @@ impl StackMachine { self.stack.push(StackValue::Map(map)); } Instruction::MakeFunction(_flags) => { - let name = if let Some(StackValue::String(name)) = self.stack.pop() { + let _name = if let Some(StackValue::String(name)) = self.stack.pop() { name } else { panic!("Expected function name") @@ -122,11 +120,8 @@ impl StackMachine { } else { panic!("Expected function annotations") }; - self.stack.push(StackValue::Function(Function { - name, - code, - annotations, - })); + self.stack + .push(StackValue::Function(Function { code, annotations })); } Instruction::Duplicate => { let value = self.stack.last().unwrap().clone();