Remove warnings in tests;
This commit is contained in:
committed by
Dan Gohman
parent
c78a9a4a7c
commit
03c22ed67a
@@ -484,7 +484,6 @@ impl<T: EntityRef + ReservedValue> EntityList<T> {
|
||||
mod tests {
|
||||
use super::*;
|
||||
use super::{sclass_for_length, sclass_size};
|
||||
use crate::packed_option::ReservedValue;
|
||||
use crate::EntityRef;
|
||||
|
||||
/// An opaque reference to an instruction in a function.
|
||||
|
||||
@@ -223,8 +223,8 @@ mod tests {
|
||||
}
|
||||
func
|
||||
.to_string()
|
||||
.trim_left_matches("function u0:0() fast {\n")
|
||||
.trim_right_matches("\n}\n")
|
||||
.trim_start_matches("function u0:0() fast {\n")
|
||||
.trim_end_matches("\n}\n")
|
||||
.to_string()
|
||||
}};
|
||||
}
|
||||
|
||||
@@ -100,8 +100,7 @@ fn main() {
|
||||
}
|
||||
}
|
||||
("deserialize", Some(m)) => {
|
||||
let mut file =
|
||||
File::open(m.value_of("FILE").unwrap()).expect("Unable to open the file");
|
||||
let file = File::open(m.value_of("FILE").unwrap()).expect("Unable to open the file");
|
||||
call_de(&file)
|
||||
}
|
||||
_ => Err("Invalid subcommand.".to_string()),
|
||||
|
||||
@@ -745,7 +745,7 @@ pub fn populate_inst(func: &Function, ebb: Ebb) -> Vec<SerInst> {
|
||||
let mut ser_vec: Vec<SerInst> = Vec::new();
|
||||
let ret_iter = func.layout.ebb_insts(ebb);
|
||||
for inst in ret_iter {
|
||||
let mut ser_inst: SerInst = SerInst::new(inst, &func);
|
||||
let ser_inst: SerInst = SerInst::new(inst, &func);
|
||||
ser_vec.push(ser_inst);
|
||||
}
|
||||
ser_vec
|
||||
@@ -867,7 +867,7 @@ impl SerObj {
|
||||
pub fn new(funcs: &[Function]) -> Self {
|
||||
let mut func_vec: Vec<SerFunction> = Vec::new();
|
||||
for func in funcs {
|
||||
let mut ser_func: SerFunction = SerFunction::new(&func);
|
||||
let ser_func: SerFunction = SerFunction::new(&func);
|
||||
func_vec.push(ser_func);
|
||||
}
|
||||
Self::create_new(func_vec)
|
||||
|
||||
Reference in New Issue
Block a user