Skip to content

Commit

Permalink
Fix clippy warning in trace (#102)
Browse files Browse the repository at this point in the history
Summary:

Test Plan:

Co-authored-by: duc-nx <>
  • Loading branch information
duc-nx authored and sjudson committed Feb 12, 2025
1 parent 31bc400 commit a323649
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions vm/src/trace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ impl UniformTrace {
/// Create a subtrace containing only block `n`.
pub fn get(&self, n: usize) -> Option<Self> {
Some(UniformTrace {
memory_layout: self.memory_layout.clone(),
memory_layout: self.memory_layout,
k: self.k,
start: n,
blocks: vec![self.block(n)?.clone()],
Expand All @@ -94,7 +94,7 @@ impl UniformTrace {
let start = index;
index += n;
UniformTrace {
memory_layout: self.memory_layout.clone(),
memory_layout: self.memory_layout,
k: self.k,
start,
blocks: bs.to_vec(),
Expand Down Expand Up @@ -141,7 +141,7 @@ impl BBTrace {
/// Create a subtrace containing only block `n`.
pub fn get(&self, n: usize) -> Option<Self> {
Some(BBTrace {
memory_layout: self.memory_layout.clone(),
memory_layout: self.memory_layout,
start: n,
blocks: vec![self.block(n)?.clone()],
})
Expand All @@ -151,7 +151,7 @@ impl BBTrace {
/// final subtrace may contain fewer than `n` blocks.
pub fn split_by(&self, n: usize) -> impl Iterator<Item = Self> + '_ {
self.blocks.chunks(n).enumerate().map(move |(i, bs)| Self {
memory_layout: self.memory_layout.clone(),
memory_layout: self.memory_layout,
start: i * n,
blocks: bs.to_vec(),
})
Expand Down Expand Up @@ -254,7 +254,7 @@ pub fn k_trace(
);

let mut trace = UniformTrace {
memory_layout: vm.memory_layout.clone(),
memory_layout: vm.memory_layout,
k,
start: 0,
blocks: Vec::new(),
Expand Down Expand Up @@ -341,7 +341,7 @@ pub fn bb_trace(
);

let mut trace = BBTrace {
memory_layout: vm.memory_layout.clone(),
memory_layout: vm.memory_layout,
start: 0,
blocks: Vec::new(),
};
Expand Down

0 comments on commit a323649

Please sign in to comment.