Skip to content

Commit

Permalink
fix clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason committed Sep 12, 2024
1 parent a995fc3 commit 5276661
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion crates/cli/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ impl SetupArg {
let mut monitor = TableMonitor::new(
self.k,
env_builder.create_flush_strategy(),
Box::new(InMemoryBackend::default()),
Box::<InMemoryBackend>::default(),
&self.phantom_functions,
&env,
);
Expand Down
12 changes: 6 additions & 6 deletions crates/cli/src/file_backend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ struct SlicePath {
external_host_call_table: PathBuf,
}

impl Into<Slice> for &SlicePath {
fn into(self) -> Slice {
impl From<&SlicePath> for Slice {
fn from(val: &SlicePath) -> Self {
Slice {
etable: EventTable::read(&self.event_table).unwrap(),
frame_table: FrameTable::read(&self.frame_table).unwrap(),
external_host_call_table: ExternalHostCallTable::read(&self.external_host_call_table)
etable: EventTable::read(&val.event_table).unwrap(),
frame_table: FrameTable::read(&val.frame_table).unwrap(),
external_host_call_table: ExternalHostCallTable::read(&val.external_host_call_table)
.unwrap(),
}
}
Expand Down Expand Up @@ -113,7 +113,7 @@ impl SliceBackend for FileBackend {

if let Some(slice) = self.peeked.as_ref() {
f((offset, slice));
offset = offset + 1;
offset += 1;
}

self.slices.iter().enumerate().for_each(|(index, slice)| {
Expand Down
2 changes: 1 addition & 1 deletion crates/cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ fn main() -> Result<()> {
let trace_backend: Box<dyn SliceBackend> = if arg.file_backend {
Box::new(FileBackend::new(cli.name, trace_dir))
} else {
Box::new(InMemoryBackend::default())
Box::<InMemoryBackend>::default()
};

let env_builder: Box<dyn HostEnvBuilder> = match config.host_mode {
Expand Down

0 comments on commit 5276661

Please sign in to comment.