Skip to content
This repository was archived by the owner on Apr 28, 2025. It is now read-only.

Commit bc6a615

Browse files
committed
Fix the parsing of three-item tuples in util
1 parent 29697dc commit bc6a615

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

crates/util/src/main.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,8 @@ macro_rules! impl_parse_tuple {
146146

147147
impl ParseTuple for ($ty, $ty, $ty) {
148148
fn parse(input: &[&str]) -> Self {
149-
assert_eq!(input.len(), 2, "expected three arguments, got {input:?}");
150-
(parse(input, 0), parse(input, 1), parse(input, 3))
149+
assert_eq!(input.len(), 3, "expected three arguments, got {input:?}");
150+
(parse(input, 0), parse(input, 1), parse(input, 2))
151151
}
152152
}
153153
};
@@ -187,8 +187,8 @@ macro_rules! impl_parse_tuple_via_rug {
187187

188188
impl ParseTuple for ($ty, $ty, $ty) {
189189
fn parse(input: &[&str]) -> Self {
190-
assert_eq!(input.len(), 2, "expected three arguments, got {input:?}");
191-
(parse_rug(input, 0), parse_rug(input, 1), parse_rug(input, 3))
190+
assert_eq!(input.len(), 3, "expected three arguments, got {input:?}");
191+
(parse_rug(input, 0), parse_rug(input, 1), parse_rug(input, 2))
192192
}
193193
}
194194
};

0 commit comments

Comments
 (0)