From 28400f6a6d8429031679a16756caefa09d7fec1d Mon Sep 17 00:00:00 2001 From: ClementTsang <34804052+ClementTsang@users.noreply.github.com> Date: Mon, 21 Nov 2022 05:03:16 -0500 Subject: [PATCH] fix issues on non-Linux regarding typos/imports --- src/app/data_harvester.rs | 4 ++-- src/app/data_harvester/processes/macos.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/data_harvester.rs b/src/app/data_harvester.rs index 4b4ac8196..b4d437a59 100644 --- a/src/app/data_harvester.rs +++ b/src/app/data_harvester.rs @@ -13,8 +13,6 @@ use starship_battery::{Battery, Manager}; #[cfg(not(target_os = "linux"))] use sysinfo::{System, SystemExt}; -use self::processes::CpuUsageStrategy; - use super::DataFilters; use crate::app::layout_manager::UsedWidgets; @@ -333,6 +331,8 @@ impl DataCollector { #[cfg(target_os = "linux")] { // Must do this here since we otherwise have to make `get_process_data` async. + use self::processes::CpuUsageStrategy; + let normalize_cpu = if self.unnormalized_cpu { heim::cpu::logical_count() .await diff --git a/src/app/data_harvester/processes/macos.rs b/src/app/data_harvester/processes/macos.rs index e32db223f..a2b61b69a 100644 --- a/src/app/data_harvester/processes/macos.rs +++ b/src/app/data_harvester/processes/macos.rs @@ -13,7 +13,7 @@ pub fn get_process_data( super::macos_freebsd::get_process_data( sys, use_current_cpu_total, - cpu_strategy, + unnormalized_cpu, mem_total_kb, user_table, get_macos_process_cpu_usage,