From 030ea93c8a0a1d2611420ae7882cf4b9182d1212 Mon Sep 17 00:00:00 2001 From: Alex Fischman Date: Sat, 16 Mar 2024 19:24:42 -0700 Subject: [PATCH] Fix clippy warnings --- brilift/src/translator.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/brilift/src/translator.rs b/brilift/src/translator.rs index 79de4f40..ff83c68f 100644 --- a/brilift/src/translator.rs +++ b/brilift/src/translator.rs @@ -1042,6 +1042,7 @@ impl Translator { } /// 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); @@ -1050,6 +1051,12 @@ impl Translator { } } +impl Default for Translator { + 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() }