style: apply format
This commit is contained in:
12
src/lib.rs
12
src/lib.rs
@@ -38,7 +38,11 @@ pub enum Commands {
|
|||||||
|
|
||||||
#[derive(Args, Debug, PartialEq)]
|
#[derive(Args, Debug, PartialEq)]
|
||||||
pub struct AddGroupsCommand {
|
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<String>,
|
pub user: Option<String>,
|
||||||
|
|
||||||
#[arg(short, long, help = "Print the groups without changing anything")]
|
#[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")]
|
#[arg(short, long, help = "Whenever to remove instead of install")]
|
||||||
pub remove: bool,
|
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,
|
pub print: bool,
|
||||||
|
|
||||||
#[command(subcommand)]
|
#[command(subcommand)]
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ fn add_groups(add_user_command: AddGroupsCommand) -> Result<()> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let groups = groups.join(",");
|
let groups = groups.join(",");
|
||||||
|
|
||||||
let user = add_user_command.user.unwrap_or_else(|| {
|
let user = add_user_command.user.unwrap_or_else(|| {
|
||||||
log::info!("No user specified, using current user");
|
log::info!("No user specified, using current user");
|
||||||
whoami::username()
|
whoami::username()
|
||||||
@@ -213,7 +213,9 @@ fn manage_package(package_command: PackageCommand) -> Result<()> {
|
|||||||
PackageSubCommand::CommonList => include_str!("../data/common_list.txt").to_string(),
|
PackageSubCommand::CommonList => include_str!("../data/common_list.txt").to_string(),
|
||||||
PackageSubCommand::AmdList => include_str!("../data/amd_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::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::FirmwareList => include_str!("../data/firmware_list.txt").to_string(),
|
||||||
PackageSubCommand::CustomList(custom_list_command) => {
|
PackageSubCommand::CustomList(custom_list_command) => {
|
||||||
log::info!("Using custom list from {}", custom_list_command.file);
|
log::info!("Using custom list from {}", custom_list_command.file);
|
||||||
|
|||||||
Reference in New Issue
Block a user