Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
lalitb committed Dec 11, 2024
1 parent d819c6f commit 2acce91
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
9 changes: 4 additions & 5 deletions stress/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,13 @@ doc = false
ctrlc = "3.2.5"
lazy_static = "1.4.0"
num_cpus = "1.15.0"
rand = { version = "0.8.4", features = ["small_rng"] }
num-format = "0.4.4"
sysinfo = { version = "0.32", optional = true }
libc = "=0.2.164" # https://github.com/GuillaumeGomez/sysinfo/issues/1392
async-trait = "0.1.51"
futures-executor = "0.3"
eventheader_dynamic = "0.4.0"
eventheader = "0.4.0"

[features]
stats = ["sysinfo"]
stats = ["sysinfo"]

[profile.release]
debug = true
6 changes: 3 additions & 3 deletions stress/src/throughput.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,8 @@ struct UnsafeSlice<'a> {
slice: &'a [UnsafeCell<WorkerStats>],
}

unsafe impl<'a> Send for UnsafeSlice<'a> {}
unsafe impl<'a> Sync for UnsafeSlice<'a> {}
unsafe impl Send for UnsafeSlice<'_> {}
unsafe impl Sync for UnsafeSlice<'_> {}

impl<'a> UnsafeSlice<'a> {
fn new(slice: &'a mut [WorkerStats]) -> Self {
Expand All @@ -155,7 +155,7 @@ impl<'a> UnsafeSlice<'a> {
#[inline(always)]
unsafe fn increment(&self, i: usize) {
let value = self.slice[i].get();
(*value).count = (*value).count + 1;
(*value).count += 1;
}

#[inline(always)]
Expand Down

0 comments on commit 2acce91

Please sign in to comment.