Fix clippy warnings

This commit is contained in:
Brian Carroll 2021-11-09 15:49:08 +00:00
parent 8392431bd8
commit 4948cee360
2 changed files with 3 additions and 6 deletions

View file

@ -31,7 +31,7 @@ const CONST_SEGMENT_BASE_ADDR: u32 = 1024;
/// Index of the data segment where we store constants /// Index of the data segment where we store constants
const CONST_SEGMENT_INDEX: usize = 0; const CONST_SEGMENT_INDEX: usize = 0;
const IMPORT_MODULE_BUILTINS: &'static str = "builtins"; const IMPORT_MODULE_BUILTINS: &str = "builtins";
pub struct WasmBackend<'a> { pub struct WasmBackend<'a> {
env: &'a Env<'a>, env: &'a Env<'a>,

View file

@ -473,11 +473,8 @@ impl<'a> LinkingSection<'a> {
pub fn symbol_table_mut(&mut self) -> &mut Vec<'a, SymInfo> { pub fn symbol_table_mut(&mut self) -> &mut Vec<'a, SymInfo> {
for sub in self.subsections.iter_mut() { for sub in self.subsections.iter_mut() {
match sub { if let LinkingSubSection::SymbolTable(syminfos) = sub {
LinkingSubSection::SymbolTable(syminfos) => { return syminfos;
return syminfos;
}
_ => {}
} }
} }
panic!("Symbol table not found"); panic!("Symbol table not found");