Minor code simplification; avoid an unneeded match.

This commit is contained in:
Dan Gohman
2018-09-12 16:06:03 -07:00
parent d0f703a6ff
commit 9e65b694bd

View File

@@ -350,14 +350,13 @@ impl<'simple_jit_backend> Backend for SimpleJITBackend {
) -> Self::FinalizedData {
use std::ptr::write_unaligned;
for record in &data.relocs {
match *record {
RelocRecord {
for &RelocRecord {
reloc,
offset,
ref name,
addend,
} => {
} in &data.relocs
{
let ptr = data.storage;
debug_assert!((offset as usize) < data.size);
let at = unsafe { ptr.offset(offset as isize) };
@@ -397,8 +396,6 @@ impl<'simple_jit_backend> Backend for SimpleJITBackend {
_ => unimplemented!(),
}
}
}
}
(data.storage, data.size)
}