From 7d392c308652bbf653221dab913ec2306a8c4e41 Mon Sep 17 00:00:00 2001 From: Franck Royer Date: Thu, 11 Feb 2021 09:47:42 +1100 Subject: [PATCH] This files contains `Command` and `Arguments` structs --- swap/src/bin/cli.rs | 4 ++-- swap/src/{cli.rs => command.rs} | 2 +- swap/src/lib.rs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) rename swap/src/{cli.rs => command.rs} (99%) diff --git a/swap/src/bin/cli.rs b/swap/src/bin/cli.rs index 03176ae3..82093a9f 100644 --- a/swap/src/bin/cli.rs +++ b/swap/src/bin/cli.rs @@ -19,7 +19,7 @@ use std::{path::PathBuf, sync::Arc}; use structopt::StructOpt; use swap::{ bitcoin, - cli::{Cancel, Command, Options, Refund, Resume}, + command::{Arguments, Cancel, Command, Refund, Resume}, config, config::{ initial_setup, query_user_for_initial_testnet_config, read_config, ConfigNotInitialized, @@ -49,7 +49,7 @@ const MONERO_BLOCKCHAIN_MONITORING_WALLET_NAME: &str = "swap-tool-blockchain-mon async fn main() -> Result<()> { init_tracing(LevelFilter::Debug).expect("initialize tracing"); - let opt = Options::from_args(); + let opt = Arguments::from_args(); let data_dir = if let Some(data_dir) = opt.data_dir { data_dir diff --git a/swap/src/cli.rs b/swap/src/command.rs similarity index 99% rename from swap/src/cli.rs rename to swap/src/command.rs index 9a1d91a5..67cdcb80 100644 --- a/swap/src/cli.rs +++ b/swap/src/command.rs @@ -4,7 +4,7 @@ use std::path::PathBuf; use uuid::Uuid; #[derive(structopt::StructOpt, Debug)] -pub struct Options { +pub struct Arguments { #[structopt( long = "data-dir", help = "Provide a custom path to the data directory.", diff --git a/swap/src/lib.rs b/swap/src/lib.rs index f042cddc..3dd85f26 100644 --- a/swap/src/lib.rs +++ b/swap/src/lib.rs @@ -17,7 +17,7 @@ )] pub mod bitcoin; -pub mod cli; +pub mod command; pub mod config; pub mod database; pub mod execution_params;