diff options
author | Lars Wirzenius <liw@liw.fi> | 2021-04-10 09:26:19 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2021-04-10 10:29:27 +0300 |
commit | 2aa0eef599db13db6802a75a8b285d75d8035033 (patch) | |
tree | 9816a250a3dd8870e6ea8fe74658473f340ffa79 /src/bin | |
parent | 7a32584448ebe00bdb45aa5daf506ce37c4811e0 (diff) | |
download | obnam2-2aa0eef599db13db6802a75a8b285d75d8035033.tar.gz |
refactor: struct ListFiles 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 72dc208..0552e3b 100644 --- a/src/bin/obnam.rs +++ b/src/bin/obnam.rs @@ -5,8 +5,9 @@ use log4rs::config::{Appender, Config, Logger, Root}; use obnam::cmd::backup::Backup; use obnam::cmd::init::Init; use obnam::cmd::list::List; +use obnam::cmd::list_files::ListFiles; use obnam::cmd::show_gen::ShowGeneration; -use obnam::cmd::{get_chunk, list_files, restore, show_config}; +use obnam::cmd::{get_chunk, restore, show_config}; use obnam::config::ClientConfig; use std::path::{Path, PathBuf}; use structopt::StructOpt; @@ -34,7 +35,7 @@ fn main() -> anyhow::Result<()> { Command::Backup(x) => x.run(&config), Command::List(x) => x.run(&config), Command::ShowGeneration(x) => x.run(&config), - Command::ListFiles { gen_id } => list_files(&config, &gen_id), + Command::ListFiles(x) => x.run(&config), Command::Restore { gen_id, to } => restore(&config, &gen_id, &to), Command::GetChunk { chunk_id } => get_chunk(&config, &chunk_id), Command::Config => show_config(&config), @@ -101,10 +102,7 @@ enum Command { Init(Init), Backup(Backup), List(List), - ListFiles { - #[structopt(default_value = "latest")] - gen_id: String, - }, + ListFiles(ListFiles), Restore { #[structopt()] gen_id: String, |