From 03e9dfebeea3d13d95d0c4bfafa6f1af5434e199 Mon Sep 17 00:00:00 2001 From: shibedrill <53824200+shibedrill@users.noreply.github.com> Date: Thu, 15 Aug 2024 17:47:26 -0400 Subject: [PATCH] Clippy autofixes --- src/main.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/main.rs b/src/main.rs index a21e4a0..713e44f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -150,11 +150,7 @@ impl Information { terminal: get_terminal(), cpu: { let cpus = sys.cpus(); - if let Some(first_cpu) = cpus.get(0) { - Some(first_cpu.brand().into()) - } else { - None - } + cpus.first().map(|first_cpu| first_cpu.brand().into()) }, gpu: {