Fix the parsing of three-item tuples in util

This commit is contained in:
Trevor Gross 2025-01-22 23:01:29 +00:00 committed by Trevor Gross
parent c788ced502
commit 42e22132b4

View file

@ -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))
}
}
};