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