Fix the parsing of three-item tuples in util
This commit is contained in:
parent
c788ced502
commit
42e22132b4
1 changed files with 4 additions and 4 deletions
|
|
@ -146,8 +146,8 @@ macro_rules! impl_parse_tuple {
|
|||
|
||||
impl ParseTuple for ($ty, $ty, $ty) {
|
||||
fn parse(input: &[&str]) -> Self {
|
||||
assert_eq!(input.len(), 2, "expected three arguments, got {input:?}");
|
||||
(parse(input, 0), parse(input, 1), parse(input, 3))
|
||||
assert_eq!(input.len(), 3, "expected three arguments, got {input:?}");
|
||||
(parse(input, 0), parse(input, 1), parse(input, 2))
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
@ -187,8 +187,8 @@ macro_rules! impl_parse_tuple_via_rug {
|
|||
|
||||
impl ParseTuple for ($ty, $ty, $ty) {
|
||||
fn parse(input: &[&str]) -> Self {
|
||||
assert_eq!(input.len(), 2, "expected three arguments, got {input:?}");
|
||||
(parse_rug(input, 0), parse_rug(input, 1), parse_rug(input, 3))
|
||||
assert_eq!(input.len(), 3, "expected three arguments, got {input:?}");
|
||||
(parse_rug(input, 0), parse_rug(input, 1), parse_rug(input, 2))
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue