Update matches with single arm to be if-let statements

This commit is contained in:
Hernando Castano
2018-05-29 22:46:11 -04:00
parent de23bfac0a
commit e6e340fa0a
7 changed files with 91 additions and 158 deletions
+2 -3
View File
@@ -142,9 +142,8 @@ pub(crate) fn generate_thunks(
match *section {
elements::Section::Export(ref mut export_section) => {
for entry in export_section.entries_mut() {
match *entry.internal_mut() {
Internal::Function(ref mut function_idx) => fixup(function_idx),
_ => {}
if let Internal::Function(ref mut function_idx) = *entry.internal_mut() {
fixup(function_idx)
}
}
}