From 1df16356ed4d1cfc125e4e0eb972d970a84697c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9ctor=20Ram=C3=B3n=20Jim=C3=A9nez?= Date: Mon, 8 Sep 2025 14:35:17 +0200 Subject: [PATCH] Remove `system` module leftover from `iced_winit` --- winit/src/system.rs | 36 ------------------------------------ 1 file changed, 36 deletions(-) delete mode 100644 winit/src/system.rs diff --git a/winit/src/system.rs b/winit/src/system.rs deleted file mode 100644 index ec13c0f3..00000000 --- a/winit/src/system.rs +++ /dev/null @@ -1,36 +0,0 @@ -//! Access the native system. -use crate::graphics::compositor; -use crate::runtime::system::{Action, Information}; -use crate::runtime::{self, Task}; - -pub(crate) fn information( - graphics_info: compositor::Information, -) -> Information { - use sysinfo::{Process, System}; - let mut system = System::new_all(); - system.refresh_all(); - - let cpu_brand = system - .cpus() - .first() - .map(|cpu| cpu.brand().to_string()) - .unwrap_or_default(); - - let memory_used = sysinfo::get_current_pid() - .and_then(|pid| system.process(pid).ok_or("Process not found")) - .map(Process::memory) - .ok(); - - Information { - system_name: System::name(), - system_kernel: System::kernel_version(), - system_version: System::long_os_version(), - system_short_version: System::os_version(), - cpu_brand, - cpu_cores: system.physical_core_count(), - memory_total: system.total_memory(), - memory_used, - graphics_adapter: graphics_info.adapter, - graphics_backend: graphics_info.backend, - } -}