From c718928f7eaa371a65d66277b07ba05f5286eed1 Mon Sep 17 00:00:00 2001 From: jackra1n <45038833+jackra1n@users.noreply.github.com> Date: Thu, 16 May 2024 00:19:30 +0200 Subject: [PATCH] Fix clippy warning --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 1aec79d..4fd769d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -92,7 +92,7 @@ fn get_ram_usage(sys: &System) -> f64 { fn get_disk_usage(sys: &System) -> f64 { let disks = sys.disks(); - if let Some(disk) = disks.get(0) { + if let Some(disk) = disks.first() { let total_space = disk.total_space(); let available_space = disk.available_space(); if total_space > 0 {