Skip to content

Commit 0e8132b

Browse files
authored
Merge branch 'master' into patch-1
2 parents 250c828 + aab0246 commit 0e8132b

File tree

4 files changed

+18
-30
lines changed

4 files changed

+18
-30
lines changed

.github/workflows/ci.yml

Lines changed: 12 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,16 @@ defaults:
2626
shell: bash
2727

2828
jobs:
29+
fmt:
30+
uses: smol-rs/.github/.github/workflows/fmt.yml@main
31+
security_audit:
32+
uses: smol-rs/.github/.github/workflows/security_audit.yml@main
33+
permissions:
34+
checks: write
35+
contents: read
36+
issues: write
37+
secrets: inherit
38+
2939
test:
3040
runs-on: ${{ matrix.os }}
3141
strategy:
@@ -77,14 +87,6 @@ jobs:
7787
run: rustup update stable
7888
- run: cargo clippy --all-features --all-targets
7989

80-
fmt:
81-
runs-on: ubuntu-latest
82-
steps:
83-
- uses: actions/checkout@v4
84-
- name: Install Rust
85-
run: rustup update stable
86-
- run: cargo fmt --all --check
87-
8890
miri:
8991
runs-on: ubuntu-latest
9092
steps:
@@ -103,28 +105,12 @@ jobs:
103105
- name: Install Rust
104106
run: rustup update stable
105107
- name: Loom tests
106-
run: cargo test --release --test loom --features loom
108+
run: cargo test --release --test loom --features loom
107109
env:
108110
RUSTFLAGS: "--cfg=loom"
109111
LOOM_MAX_PREEMPTIONS: 4
110112
- name: Loom tests without default features
111-
run: cargo test --release --test loom --features loom --no-default-features
113+
run: cargo test --release --test loom --features loom --no-default-features
112114
env:
113115
RUSTFLAGS: "--cfg=loom"
114116
LOOM_MAX_PREEMPTIONS: 4
115-
116-
security_audit:
117-
permissions:
118-
checks: write
119-
contents: read
120-
issues: write
121-
runs-on: ubuntu-latest
122-
steps:
123-
- uses: actions/checkout@v4
124-
# rustsec/audit-check used to do this automatically
125-
- name: Generate Cargo.lock
126-
run: cargo generate-lockfile
127-
# https://github.com/rustsec/audit-check/issues/2
128-
- uses: rustsec/[email protected]
129-
with:
130-
token: ${{ secrets.GITHUB_TOKEN }}

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ name = "bench"
3535
harness = false
3636

3737
[dev-dependencies]
38-
criterion = { version = "0.5", features = ["cargo_bench_support"], default-features = false }
38+
criterion = { version = "0.6", default-features = false, features = ["cargo_bench_support"] }
3939
easy-parallel = "3.1.0"
4040
fastrand = "2.0.0"
4141

benches/bench.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
use std::{any::type_name, fmt::Debug};
1+
#![allow(clippy::incompatible_msrv)] // false positive: https://github.com/rust-lang/rust-clippy/issues/12257#issuecomment-2093667187
2+
3+
use std::{any::type_name, fmt::Debug, hint::black_box};
24

35
use concurrent_queue::{ConcurrentQueue, PopError};
4-
use criterion::{black_box, criterion_group, criterion_main, Criterion};
6+
use criterion::{criterion_group, criterion_main, Criterion};
57
use easy_parallel::Parallel;
68

79
const COUNT: usize = 100_000;

src/bounded.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ impl<T> Bounded<T> {
231231
let slot = &self.buffer[index];
232232
let stamp = slot.stamp.load(Ordering::Acquire);
233233

234-
// If the the stamp is ahead of the head by 1, we may attempt to pop.
234+
// If the stamp is ahead of the head by 1, we may attempt to pop.
235235
if head + 1 == stamp {
236236
let new = if index + 1 < self.buffer.len() {
237237
// Same lap, incremented index.

0 commit comments

Comments
 (0)