mirror of
https://github.com/AleoHQ/leo.git
synced 2024-11-29 03:35:10 +03:00
Rename update command 'Sub' to 'Automatic'
This commit is contained in:
parent
2e00ff451e
commit
bea3ee31f6
@ -52,7 +52,7 @@ pub mod test;
|
||||
pub use test::Test;
|
||||
|
||||
pub mod update;
|
||||
pub use update::{Sub as UpdateAutomatic, Update};
|
||||
pub use update::{Automatic as UpdateAutomatic, Update};
|
||||
|
||||
pub mod watch;
|
||||
pub use watch::Watch;
|
||||
|
@ -22,7 +22,7 @@ use tracing::span::Span;
|
||||
|
||||
/// Setting for automatic updates of Leo
|
||||
#[derive(Debug, StructOpt, PartialEq)]
|
||||
pub enum Sub {
|
||||
pub enum Automatic {
|
||||
Automatic {
|
||||
#[structopt(name = "bool", help = "Boolean value: true or false", parse(try_from_str))]
|
||||
value: bool,
|
||||
@ -43,11 +43,11 @@ pub struct Update {
|
||||
|
||||
/// Setting for automatic updates of Leo
|
||||
#[structopt(subcommand)]
|
||||
automatic: Option<Sub>,
|
||||
automatic: Option<Automatic>,
|
||||
}
|
||||
|
||||
impl Update {
|
||||
pub fn new(list: bool, studio: bool, automatic: Option<Sub>) -> Update {
|
||||
pub fn new(list: bool, studio: bool, automatic: Option<Automatic>) -> Update {
|
||||
Update {
|
||||
list,
|
||||
studio,
|
||||
@ -75,7 +75,7 @@ impl Command for Update {
|
||||
}
|
||||
|
||||
// in case automatic subcommand was called
|
||||
if let Some(Sub::Automatic { value }) = self.automatic {
|
||||
if let Some(Automatic::Automatic { value }) = self.automatic {
|
||||
Config::set_update_automatic(value)?;
|
||||
|
||||
match value {
|
||||
|
Loading…
Reference in New Issue
Block a user