Eliminate redundant uses of format!.

https://github.com/rust-lang-nursery/rust-clippy/wiki#useless_format
This commit is contained in:
Dan Gohman
2017-08-31 11:43:54 -07:00
parent abbc6ddf24
commit acf4f1009b
2 changed files with 2 additions and 2 deletions

View File

@@ -254,7 +254,7 @@ pub fn translate_module(
.collect() .collect()
} }
ParserState::EndSection => break, ParserState::EndSection => break,
_ => return Err(String::from(format!("wrong content in code section"))), _ => return Err(String::from("wrong content in code section")),
}; };
let signature = signatures[functions[function_index as usize] as usize].clone(); let signature = signatures[functions[function_index as usize] as usize].clone();
match translate_function_body( match translate_function_body(

View File

@@ -283,7 +283,7 @@ pub fn parse_data_section(
}; };
match runtime.declare_data_initialization(memory_index as MemoryIndex, offset, data) { match runtime.declare_data_initialization(memory_index as MemoryIndex, offset, data) {
Ok(()) => (), Ok(()) => (),
Err(s) => return Err(SectionParsingError::WrongSectionContent(format!("{}", s))), Err(s) => return Err(SectionParsingError::WrongSectionContent(s)),
}; };
} }
match *parser.read() { match *parser.read() {