Skip to content

Commit 1fd3bfb

Browse files
Fix clippy lint for importing Arc from std instead of alloc (#21380)
# Objective Currently, when running `cargo clippy`, we get a warning from `bevy_diagnostic` that `Arc` is imported from `std::sync` instead of `alloc::sync`. That's the only clippy warning in the project. ## Solution Change the offending file to import `Arc` from `alloc::sync` instead of `std::sync`. ## Testing Since `alloc::sync::Arc` is the same as `std::sync::Arc`, there should be no differences in behavior. Co-authored-by: LeandroVandari <[email protected]>
1 parent 2d99d22 commit 1fd3bfb

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

crates/bevy_diagnostic/src/system_information_diagnostics_plugin.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,14 +74,12 @@ mod internal {
7474
pin::Pin,
7575
task::{Context, Poll},
7676
};
77-
use std::sync::{
78-
mpsc::{self, Receiver, Sender},
79-
Arc,
80-
};
77+
use std::sync::mpsc::{self, Receiver, Sender};
8178

8279
use alloc::{
8380
format,
8481
string::{String, ToString},
82+
sync::Arc,
8583
};
8684
use atomic_waker::AtomicWaker;
8785
use bevy_app::{App, First, Startup, Update};

0 commit comments

Comments
 (0)