From 06e07a76a4d1cfd1ca1c9e2785f95a164cd25e7f Mon Sep 17 00:00:00 2001 From: Vladislav Nepogodin Date: Mon, 3 Apr 2023 19:09:26 +0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=B9=20make=20clippy=20happy?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/pages.rs b/src/pages.rs index dac3dca..46d7469 100644 --- a/src/pages.rs +++ b/src/pages.rs @@ -520,12 +520,10 @@ fn on_servbtn_clicked(button: >k::CheckButton) { } else { format!("/sbin/pkexec bash -c \"systemctl enable --now --force {action_data}\"") } + } else if action_type == "user_service" { + format!("systemctl --user disable --now {action_data}") } else { - if action_type == "user_service" { - format!("systemctl --user disable --now {action_data}") - } else { - format!("/sbin/pkexec bash -c \"systemctl disable --now {action_data}\"") - } + format!("/sbin/pkexec bash -c \"systemctl disable --now {action_data}\"") }; // Create context channel.