aboutsummaryrefslogtreecommitdiff
path: root/argparse/src/action.rs
diff options
context:
space:
mode:
authorRobin Krahl <robin.krahl@ireas.org>2020-01-07 15:17:16 +0000
committerDaniel Mueller <deso@posteo.net>2020-01-08 09:21:15 -0800
commit0b673f2f0184efa0111c4978a2a4159598dee7a6 (patch)
tree4e420e4f6359d1f258ab3fd285de56ad81a13760 /argparse/src/action.rs
parent8482335491aa55b0458ffedccd1fc110f092e38a (diff)
downloadnitrocli-0b673f2f0184efa0111c4978a2a4159598dee7a6.tar.gz
nitrocli-0b673f2f0184efa0111c4978a2a4159598dee7a6.tar.bz2
Remove argparse dependency
As we have replaced argparse with structopt, we no longer need it as a dependency. This patch removes the dependency from Cargo.toml and deletes the included copy. Delete subrepo argparse/:argparse
Diffstat (limited to 'argparse/src/action.rs')
-rw-r--r--argparse/src/action.rs33
1 files changed, 0 insertions, 33 deletions
diff --git a/argparse/src/action.rs b/argparse/src/action.rs
deleted file mode 100644
index c3a0aff..0000000
--- a/argparse/src/action.rs
+++ /dev/null
@@ -1,33 +0,0 @@
-use std::cell::RefCell;
-use std::rc::Rc;
-
-pub enum ParseResult {
- Parsed,
- Help,
- Exit,
- Error(String),
-}
-
-
-pub enum Action<'a> {
- Flag(Box<IFlagAction + 'a>),
- Single(Box<IArgAction + 'a>),
- Push(Box<IArgsAction + 'a>),
- Many(Box<IArgsAction + 'a>),
-}
-
-pub trait TypedAction<T> {
- fn bind<'x>(&self, Rc<RefCell<&'x mut T>>) -> Action<'x>;
-}
-
-pub trait IFlagAction {
- fn parse_flag(&self) -> ParseResult;
-}
-
-pub trait IArgAction {
- fn parse_arg(&self, arg: &str) -> ParseResult;
-}
-
-pub trait IArgsAction {
- fn parse_args(&self, args: &[&str]) -> ParseResult;
-}