Skip to content

Commit

Permalink
fix: clone on copy
Browse files Browse the repository at this point in the history
  • Loading branch information
paripalpp committed Jun 17, 2024
1 parent 9670ca7 commit 9050b81
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/encoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,12 @@ where
let count_delta = count
- critical_section::with(|cs| {
let binding = self.last_speed_update_count.borrow(cs).borrow();
binding.deref().clone()
*binding
});
let delta: i64 = (now_us
- critical_section::with(|cs| {
let binding = self.last_speed_update_time.borrow(cs).borrow();
binding.deref().clone()
*binding
}))
.try_into()
.unwrap();
Expand Down

0 comments on commit 9050b81

Please sign in to comment.