Skip to content

Commit

Permalink
remove allow_unused, move allow(non_snake_case) to where it shoul…
Browse files Browse the repository at this point in the history
…d be

- based on review "Why allow non_snake_case?"

in winnow-rs#614 (comment)

- remove `allow_unused` based on "Whats getting unused?"
winnow-rs#614 (comment)
  • Loading branch information
39555 committed Nov 16, 2024
1 parent 7ec3a11 commit b9f321f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/combinator/precedence.rs
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,6 @@ macro_rules! impl_parser_for_tuple {
};
(~ $($X:ident)+) => {

#[allow(unused_variables, non_snake_case)]
impl<I, O: 'static, E, $($X),*> AsPrecedence<I, O, E> for ($($X,)*)
where
I: Stream + StreamIsPartial,
Expand All @@ -234,7 +233,6 @@ macro_rules! impl_parser_for_tuple {
}
}

#[allow(unused_variables, non_snake_case)]
impl<'s, I, O: 'static, E, $($X),*> Parser<I, (&'s RefCell<dyn Fn(O) -> O>, usize), E>
for Prefix<&'s ($($X,)*)>
where
Expand All @@ -245,6 +243,7 @@ macro_rules! impl_parser_for_tuple {
{
#[inline(always)]
fn parse_next(&mut self, input: &mut I) -> PResult<(&'s RefCell<dyn Fn(O) -> O>, usize), E> {
#[allow(non_snake_case)]
let ($($X,)*) = self.0;
alt(($($X.as_prefix(),)*)).parse_next(input)
}
Expand Down

0 comments on commit b9f321f

Please sign in to comment.