diff options
author | Lars Wirzenius <liw@liw.fi> | 2021-04-10 09:35:59 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2021-04-10 10:29:27 +0300 |
commit | 20a5db2cc1b348087bca5e689ed38f98e1150955 (patch) | |
tree | 5c3cef3c30f43045c057c23dd162b5c9c02ceb6d /src/bin | |
parent | 3defb987dad68fa45dbf8a0044adb97104d04a0b (diff) | |
download | obnam2-20a5db2cc1b348087bca5e689ed38f98e1150955.tar.gz |
refactor: struct GetChunk subcommand
Diffstat (limited to 'src/bin')
-rw-r--r-- | src/bin/obnam.rs | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/bin/obnam.rs b/src/bin/obnam.rs index dcd09f6..a064bf9 100644 --- a/src/bin/obnam.rs +++ b/src/bin/obnam.rs @@ -3,12 +3,13 @@ use log::{debug, error, info, LevelFilter}; use log4rs::append::file::FileAppender; use log4rs::config::{Appender, Config, Logger, Root}; use obnam::cmd::backup::Backup; +use obnam::cmd::get_chunk::GetChunk; use obnam::cmd::init::Init; use obnam::cmd::list::List; use obnam::cmd::list_files::ListFiles; use obnam::cmd::restore::Restore; +use obnam::cmd::show_config; use obnam::cmd::show_gen::ShowGeneration; -use obnam::cmd::{get_chunk, show_config}; use obnam::config::ClientConfig; use std::path::{Path, PathBuf}; use structopt::StructOpt; @@ -38,7 +39,7 @@ fn main() -> anyhow::Result<()> { Command::ShowGeneration(x) => x.run(&config), Command::ListFiles(x) => x.run(&config), Command::Restore(x) => x.run(&config), - Command::GetChunk { chunk_id } => get_chunk(&config, &chunk_id), + Command::GetChunk(x) => x.run(&config), Command::Config => show_config(&config), } }; @@ -106,9 +107,6 @@ enum Command { ListFiles(ListFiles), Restore(Restore), ShowGeneration(ShowGeneration), - GetChunk { - #[structopt()] - chunk_id: String, - }, + GetChunk(GetChunk), Config, } |