Skip to content

Commit

Permalink
Appease rustc 173b950
Browse files Browse the repository at this point in the history
  • Loading branch information
Jules-Bertholet committed Nov 21, 2023
1 parent cc3efbb commit 545be94
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/rwlock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ fn contention() {
let tx = tx.clone();
let rw = rw.clone();

spawn(async move {
let _spawned = spawn(async move {
for _ in 0..M {
if fastrand::u32(..N) == 0 {
drop(rw.write().await);
Expand Down Expand Up @@ -151,7 +151,7 @@ fn contention_arc() {
let tx = tx.clone();
let rw = rw.clone();

spawn(async move {
let _spawned = spawn(async move {
for _ in 0..M {
if fastrand::u32(..N) == 0 {
drop(rw.write_arc().await);
Expand All @@ -177,7 +177,7 @@ fn writer_and_readers() {
let (tx, rx) = async_channel::unbounded();

// Spawn a writer task.
spawn({
let _spawned = spawn({
let lock = lock.clone();
async move {
let mut lock = lock.write().await;
Expand Down Expand Up @@ -223,7 +223,7 @@ fn writer_and_readers_arc() {
let (tx, rx) = async_channel::unbounded();

// Spawn a writer task.
spawn({
let _spawned = spawn({
let lock = lock.clone();
async move {
let mut lock = lock.write_arc().await;
Expand Down

0 comments on commit 545be94

Please sign in to comment.