From bc641d4a0b5dde80c751feb9bf3403fefd2cbb50 Mon Sep 17 00:00:00 2001 From: tcmal Date: Thu, 27 Jun 2024 00:02:39 +0100 Subject: cleanup spawn helper --- src/config.rs | 2 -- src/helpers.rs | 8 ++------ 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/src/config.rs b/src/config.rs index 3c2b309..d1bd350 100644 --- a/src/config.rs +++ b/src/config.rs @@ -1,8 +1,6 @@ //! User configuration #![allow(clippy::unreadable_literal)] // Colours are more readable this way imo -use std::process::Command; - use xcb::x::ModMask; use xkeysym::Keysym; diff --git a/src/helpers.rs b/src/helpers.rs index ffd11d7..51ebae8 100644 --- a/src/helpers.rs +++ b/src/helpers.rs @@ -26,12 +26,8 @@ where I: IntoIterator, S: AsRef, { - let c = match Command::new(cmd).args(args).spawn() { - Ok(c) => c, - Err(e) => { - eprintln!("error spawning {cmd}: {e:#?}"); - return; - } + if let Err(e) = Command::new(cmd).args(args).spawn() { + eprintln!("error spawning {cmd}: {e:#?}"); }; } -- cgit v1.2.3