diff options
Diffstat (limited to 'mingling/src/parser/args.rs')
| -rw-r--r-- | mingling/src/parser/args.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/mingling/src/parser/args.rs b/mingling/src/parser/args.rs index e659feb..a1f1eb0 100644 --- a/mingling/src/parser/args.rs +++ b/mingling/src/parser/args.rs @@ -1,5 +1,8 @@ +use std::mem::replace; + use mingling_core::{Flag, special_argument, special_flag}; +#[derive(Debug, Default)] pub struct Argument { vec: Vec<String>, } @@ -92,4 +95,10 @@ impl Argument { } false } + + /// Dump all remaining arguments + pub fn dump_remains(&mut self) -> Vec<String> { + let new = Vec::new(); + replace(&mut self.vec, new) + } } |
