Added LT, GT, LTE, and GTE functions, and big test coverage
This commit is contained in:
parent
5d89c6b684
commit
c74d6f5ddf
6 changed files with 468 additions and 11 deletions
|
|
@ -145,7 +145,7 @@ impl Args {
|
|||
} else {
|
||||
return Err("expected no args".to_string());
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
Args::Infinite => {
|
||||
if !args.is_empty() {
|
||||
|
|
@ -153,7 +153,7 @@ impl Args {
|
|||
} else {
|
||||
return Err("expected args but none were provided".to_string());
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
Args::Lazy(ref num) => {
|
||||
let called_arg_count = args.len();
|
||||
|
|
@ -168,7 +168,7 @@ impl Args {
|
|||
} else if let Ctr::None = *args.car {
|
||||
return Err(format!("expected {} args. Got 0.", num,));
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
Args::Strict(ref arg_types) => {
|
||||
let mut idx: usize = 0;
|
||||
|
|
@ -203,7 +203,7 @@ impl Args {
|
|||
return Err("too few arguments".to_string());
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
Ok(())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue