Skip to content

Commit 9b2ef6c

Browse files
mnmaitadependabot[bot]alice-i-cecile
authored
Update sysinfo requirement from 0.32.0 to 0.33.0 (#16851)
# Objective - Fixes #16722 ## Solution - Replaced renamed methods to migrate `sysinfo` properly to 0.33.0. ## Testing - CI checks are passing now. --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Alice Cecile <[email protected]>
1 parent 21195a7 commit 9b2ef6c

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

crates/bevy_diagnostic/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,14 @@ const-fnv1a-hash = "1.1.0"
2727
# macOS
2828
[target.'cfg(all(target_os="macos"))'.dependencies]
2929
# Some features of sysinfo are not supported by apple. This will disable those features on apple devices
30-
sysinfo = { version = "0.32.0", optional = true, default-features = false, features = [
30+
sysinfo = { version = "0.33.0", optional = true, default-features = false, features = [
3131
"apple-app-store",
3232
"system",
3333
] }
3434

3535
# Only include when on linux/windows/android/freebsd
3636
[target.'cfg(any(target_os = "linux", target_os = "windows", target_os = "android", target_os = "freebsd"))'.dependencies]
37-
sysinfo = { version = "0.32.0", optional = true, default-features = false, features = [
37+
sysinfo = { version = "0.33.0", optional = true, default-features = false, features = [
3838
"system",
3939
] }
4040

crates/bevy_diagnostic/src/system_information_diagnostics_plugin.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,8 @@ pub mod internal {
108108
) {
109109
let sysinfo = sysinfo.get_or_insert_with(|| {
110110
Arc::new(Mutex::new(System::new_with_specifics(
111-
RefreshKind::new()
112-
.with_cpu(CpuRefreshKind::new().with_cpu_usage())
111+
RefreshKind::nothing()
112+
.with_cpu(CpuRefreshKind::nothing().with_cpu_usage())
113113
.with_memory(MemoryRefreshKind::everything()),
114114
)))
115115
});
@@ -129,7 +129,7 @@ pub mod internal {
129129
let task = thread_pool.spawn(async move {
130130
let mut sys = sys.lock().unwrap();
131131

132-
sys.refresh_cpu_specifics(CpuRefreshKind::new().with_cpu_usage());
132+
sys.refresh_cpu_specifics(CpuRefreshKind::nothing().with_cpu_usage());
133133
sys.refresh_memory();
134134
let current_cpu_usage = sys.global_cpu_usage().into();
135135
// `memory()` fns return a value in bytes
@@ -166,9 +166,9 @@ pub mod internal {
166166
impl Default for SystemInfo {
167167
fn default() -> Self {
168168
let sys = System::new_with_specifics(
169-
RefreshKind::new()
170-
.with_cpu(CpuRefreshKind::new())
171-
.with_memory(MemoryRefreshKind::new().with_ram()),
169+
RefreshKind::nothing()
170+
.with_cpu(CpuRefreshKind::nothing())
171+
.with_memory(MemoryRefreshKind::nothing().with_ram()),
172172
);
173173

174174
let system_info = SystemInfo {

0 commit comments

Comments
 (0)