We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8590c82 commit 4b8b265Copy full SHA for 4b8b265
1 file changed
src/lib.rs
@@ -31,8 +31,15 @@ pub mod parse {
31
pub fn switches() -> Vec<String> {
32
let mut switches: Vec<String> = vec![];
33
let args: Vec<String> = env::args().collect();
34
- for i in 0..args.len(){
35
-
+ let mut c_index: usize = 0;
+ for i in &args {
36
+ if i.starts_with("--"){
37
+ if args[c_index].starts_with("--"){
38
+ switches.push(i.to_owned());
39
+ }
40
41
+ c_index = c_index+1;
42
}
43
+ return switches;
44
45
0 commit comments