From 08ce6aa81b4181217b928af30143e028d7597d27 Mon Sep 17 00:00:00 2001 From: Michal S Date: Wed, 7 Sep 2022 20:34:19 +0100 Subject: [PATCH] Clippy + FMT --- src/functions/desktops.rs | 7 +------ src/functions/users.rs | 6 +++++- src/internal/exec.rs | 2 +- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/functions/desktops.rs b/src/functions/desktops.rs index bda893e..ed963ad 100755 --- a/src/functions/desktops.rs +++ b/src/functions/desktops.rs @@ -276,12 +276,7 @@ fn install_kde() { } fn install_gnome() { - install(vec![ - "xorg", - "gnome", - "sushi", - "gdm" - ]); + install(vec!["xorg", "gnome", "sushi", "gdm"]); enable_dm("gdm"); } diff --git a/src/functions/users.rs b/src/functions/users.rs index 963e7a2..7d5572d 100755 --- a/src/functions/users.rs +++ b/src/functions/users.rs @@ -55,7 +55,11 @@ pub fn new_user(username: &str, hasroot: bool, password: &str, do_hash_pass: boo format!("Add user {} to wheel group", username).as_str(), ); files_eval( - files::sed_file("/mnt/etc/sudoers", "# %wheel ALL=(ALL) ALL", "%wheel ALL=(ALL) ALL"), + files::sed_file( + "/mnt/etc/sudoers", + "# %wheel ALL=(ALL) ALL", + "%wheel ALL=(ALL) ALL", + ), "Add wheel group to sudoers", ); files_eval( diff --git a/src/internal/exec.rs b/src/internal/exec.rs index 95ff263..d2dae75 100755 --- a/src/internal/exec.rs +++ b/src/internal/exec.rs @@ -10,7 +10,7 @@ pub fn exec_chroot( args: Vec, ) -> Result { let returncode = Command::new("bash") - .args(&[ + .args([ "-c", format!("arch-chroot /mnt {} {}", command, args.join(" ")).as_str(), ])