From 3f364619c8f7bf193ecf7688dffd9f06310dfadc Mon Sep 17 00:00:00 2001 From: Ethan Uppal <113849268+ethanuppal@users.noreply.github.com> Date: Wed, 28 Aug 2024 13:25:51 -0400 Subject: [PATCH] clippy --- tools/calyx-ffi/src/backend/cider.rs | 4 ++-- tools/calyx-ffi/src/lib.rs | 2 +- tools/tb/examples/calyx/test.rs | 4 ++-- tools/tb/src/driver.rs | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tools/calyx-ffi/src/backend/cider.rs b/tools/calyx-ffi/src/backend/cider.rs index 53a930858a..9f7e3438db 100644 --- a/tools/calyx-ffi/src/backend/cider.rs +++ b/tools/calyx-ffi/src/backend/cider.rs @@ -1,5 +1,4 @@ use calyx_ir::Context; -use core::panic; use interp::{ flatten::{ flat_ir, @@ -16,7 +15,8 @@ pub struct CiderFFIBackend { } impl CiderFFIBackend { - pub fn from(ctx: &Context, name: &'static str) -> Self { + pub fn from(ctx: &Context, _name: &'static str) -> Self { + // TODO(ethan, maybe griffin): use _name to select the component somehow let ctx = flat_ir::translate(ctx); let simulator = Simulator::build_simulator(Rc::new(ctx), &None) .expect("we live on the edge"); diff --git a/tools/calyx-ffi/src/lib.rs b/tools/calyx-ffi/src/lib.rs index ccecc28b48..b4644d545a 100644 --- a/tools/calyx-ffi/src/lib.rs +++ b/tools/calyx-ffi/src/lib.rs @@ -55,7 +55,7 @@ impl CalyxFFI { pub fn new_comp( &mut self, ) -> CalyxFFIComponentRef { - let mut comp = unsafe { T::default() }; + let mut comp = T::default(); let path = comp.path(); let context = self.contexts.entry(path).or_insert_with_key(|path| { // there has to be a better way to find lib diff --git a/tools/tb/examples/calyx/test.rs b/tools/tb/examples/calyx/test.rs index f70fcdec5c..b0a9135ddc 100644 --- a/tools/tb/examples/calyx/test.rs +++ b/tools/tb/examples/calyx/test.rs @@ -9,7 +9,7 @@ declare_calyx_interface! { } #[calyx_ffi( - src = "/Users/ethan/Documents/GitHub/calyx/tools/tb/examples/calyx/adder.futil", + src = "/home/runner/work/calyx/calyx/tools/tb/examples/calyx/adder.futil", comp = "main", backend = cider_ffi_backend, derive = [ @@ -19,7 +19,7 @@ declare_calyx_interface! { struct Adder; #[calyx_ffi( - src = "/Users/ethan/Documents/GitHub/calyx/tools/tb/examples/calyx/subber.futil", + src = "/home/runner/work/calyx/calyx/tools/tb/examples/calyx/subber.futil", comp = "main", backend = cider_ffi_backend, derive = [ diff --git a/tools/tb/src/driver.rs b/tools/tb/src/driver.rs index 4e72be9a0b..9859003986 100644 --- a/tools/tb/src/driver.rs +++ b/tools/tb/src/driver.rs @@ -1,6 +1,6 @@ use std::{ collections::HashMap, - fs, io, + io, path::{Path, PathBuf}, };