From 2811b8b29390e95fc4cf215833447c9a190d4f18 Mon Sep 17 00:00:00 2001 From: Dmitriy Pleshevskiy Date: Sun, 31 Jan 2021 02:54:23 +0300 Subject: [PATCH] refac(cli): move opts to separate file --- migra-cli/src/main.rs | 8 ++------ migra-cli/src/opts.rs | 6 ++++++ 2 files changed, 8 insertions(+), 6 deletions(-) create mode 100644 migra-cli/src/opts.rs diff --git a/migra-cli/src/main.rs b/migra-cli/src/main.rs index 272d7a1..2a3a0e7 100644 --- a/migra-cli/src/main.rs +++ b/migra-cli/src/main.rs @@ -1,12 +1,8 @@ #![deny(clippy::all)] -use structopt::StructOpt; - -#[derive(Debug, StructOpt)] -enum AppOpt { - Init, -} +mod opts; +use opts::{AppOpt, StructOpt}; fn main() { let opt = AppOpt::from_args(); diff --git a/migra-cli/src/opts.rs b/migra-cli/src/opts.rs new file mode 100644 index 0000000..1d3fdfe --- /dev/null +++ b/migra-cli/src/opts.rs @@ -0,0 +1,6 @@ +pub use structopt::StructOpt; + +#[derive(Debug, StructOpt)] +pub(crate) enum AppOpt { + Init, +}