- rename `command` field to `sub_command` in `Cli` and `ConfigCli` structs
- rename `Commands` enum to `SubCmds` to reflect its role as subcommand
- update references to the renamed fields and enum variants
- this improves code readability and avoids confusion with other command concepts
🐛 fix(config): correct method name for setting eol action
- rename `set_command` to `set_action` in `EolRule` struct
- update references in `config.rs` to use the correct method name
- this fixes a bug where the eol action was not being set correctly
23 lines
618 B
Rust
23 lines
618 B
Rust
use std::fmt;
|
|
|
|
/// End of life action
|
|
/// - Trash - move the message to the trash to be automatically deleted by Google
|
|
/// - Delete - delete the message immediately without allowing rescue from trash
|
|
#[derive(Debug, Default)]
|
|
pub enum EolAction {
|
|
#[default]
|
|
/// Move the message to the trash
|
|
Trash,
|
|
/// Delete the message immediately
|
|
Delete,
|
|
}
|
|
|
|
impl fmt::Display for EolAction {
|
|
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
|
match self {
|
|
EolAction::Trash => write!(f, "trash"),
|
|
EolAction::Delete => write!(f, "delete"),
|
|
}
|
|
}
|
|
}
|