Skip to content

Commit

Permalink
Fix clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex-Fischman committed Mar 17, 2024
1 parent 19e1b5b commit 030ea93
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions brilift/src/translator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1042,6 +1042,7 @@ impl Translator<JITModule> {
}

/// Run a JITted wrapper function.
#[allow(clippy::missing_safety_doc)]
pub unsafe fn run(&mut self, func_id: cranelift_module::FuncId, args: &[bril::Literal]) {
let func_ptr = self.get_func_ptr(func_id);
let arg_ptrs = Self::val_ptrs(args);
Expand All @@ -1050,6 +1051,12 @@ impl Translator<JITModule> {
}
}

impl Default for Translator<JITModule> {
fn default() -> Self {
Self::new()
}
}

pub fn find_func<'a>(funcs: &'a [bril::Function], name: &str) -> &'a bril::Function {
funcs.iter().find(|f| f.name == name).unwrap()
}

0 comments on commit 030ea93

Please sign in to comment.