Clippy fixes (#692)

This commit is contained in:
XAMPPRocky
2019-12-24 20:50:07 +00:00
committed by Dan Gohman
parent 6c97cfed1e
commit 907e7aac01
35 changed files with 390 additions and 417 deletions

View File

@@ -129,16 +129,14 @@ pub fn link_module(
// Sanity-check: Ensure that the imported memory has at least
// guard-page protections the importing module expects it to have.
match (memory.style, &import_memory.style) {
(
MemoryStyle::Static { bound },
MemoryStyle::Static {
bound: import_bound,
},
) => {
assert_ge!(bound, *import_bound);
}
_ => (),
if let (
MemoryStyle::Static { bound },
MemoryStyle::Static {
bound: import_bound,
},
) = (memory.style, &import_memory.style)
{
assert_ge!(bound, *import_bound);
}
assert_ge!(memory.offset_guard_size, import_memory.offset_guard_size);