Make an initial pass through clippy warnings.

This commit is contained in:
Dan Gohman
2018-07-20 16:16:36 -07:00
parent f3a6cab472
commit dd3a9dab6e
3 changed files with 8 additions and 12 deletions

View File

@@ -85,7 +85,7 @@ impl Instance {
pub fn inspect_memory(&self, memory_index: usize, address: usize, len: usize) -> &[u8] {
&self.memories
.get(memory_index)
.expect(format!("no memory for index {}", memory_index).as_str())
.unwrap_or_else(|| panic!("no memory for index {}", memory_index))
[address..address + len]
}