diff --git a/src/lib.rs b/src/lib.rs index b5a7c49..f00bd13 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -38,7 +38,11 @@ pub enum Commands { #[derive(Args, Debug, PartialEq)] pub struct AddGroupsCommand { - #[arg(short, long, help = "The user to add to the groups, current user by default")] + #[arg( + short, + long, + help = "The user to add to the groups, current user by default" + )] pub user: Option, #[arg(short, long, help = "Print the groups without changing anything")] @@ -68,7 +72,11 @@ pub struct PackageCommand { #[arg(short, long, help = "Whenever to remove instead of install")] pub remove: bool, - #[arg(short, long, help = "Print packages of the list without changing anything")] + #[arg( + short, + long, + help = "Print packages of the list without changing anything" + )] pub print: bool, #[command(subcommand)] diff --git a/src/main.rs b/src/main.rs index 4ba0a63..e4fd790 100644 --- a/src/main.rs +++ b/src/main.rs @@ -84,7 +84,7 @@ fn add_groups(add_user_command: AddGroupsCommand) -> Result<()> { } let groups = groups.join(","); - + let user = add_user_command.user.unwrap_or_else(|| { log::info!("No user specified, using current user"); whoami::username() @@ -213,7 +213,9 @@ fn manage_package(package_command: PackageCommand) -> Result<()> { PackageSubCommand::CommonList => include_str!("../data/common_list.txt").to_string(), PackageSubCommand::AmdList => include_str!("../data/amd_list.txt").to_string(), PackageSubCommand::IntelList => include_str!("../data/intel_list.txt").to_string(), - PackageSubCommand::GnomeExtraList => include_str!("../data/gnome_extra_list.txt").to_string(), + PackageSubCommand::GnomeExtraList => { + include_str!("../data/gnome_extra_list.txt").to_string() + } PackageSubCommand::FirmwareList => include_str!("../data/firmware_list.txt").to_string(), PackageSubCommand::CustomList(custom_list_command) => { log::info!("Using custom list from {}", custom_list_command.file);