arguments need to be longer
This commit is contained in:
parent
b44dc1bd09
commit
f72ad4b616
1 changed files with 3 additions and 3 deletions
|
@ -54,7 +54,7 @@ impl Pattern for Value {
|
|||
}
|
||||
}
|
||||
fn parse(args: Vec<String>) -> Result<Self, ParseError> {
|
||||
let param1 = if args.len() >= 1 {
|
||||
let param1 = if args.len() > 1 {
|
||||
match args[1].parse::<u8>() {
|
||||
Ok(i) => Some(i),
|
||||
Err(_) => None
|
||||
|
@ -62,7 +62,7 @@ impl Pattern for Value {
|
|||
} else {
|
||||
None
|
||||
};
|
||||
let param2 = if args.len() >= 2 {
|
||||
let param2 = if args.len() > 2 {
|
||||
match args[2].parse::<u8>() {
|
||||
Ok(i) => Some(i),
|
||||
Err(_) => None
|
||||
|
@ -70,7 +70,7 @@ impl Pattern for Value {
|
|||
} else {
|
||||
None
|
||||
};
|
||||
let param3 = if args.len() >= 3 {
|
||||
let param3 = if args.len() > 3 {
|
||||
match args[3].parse::<u8>() {
|
||||
Ok(i) => Some(i),
|
||||
Err(_) => None
|
||||
|
|
Loading…
Reference in a new issue