Skip to content

Commit

Permalink
tuple clone cleanup (#1749)
Browse files Browse the repository at this point in the history
  • Loading branch information
Geal committed May 5, 2024
1 parent 46eaa0a commit 5773e90
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/sequence/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -272,17 +272,17 @@ macro_rules! tuple_trait_impl(

macro_rules! tuple_trait_inner(
($it:tt, $self:expr, $input:expr, (), $head:ident $($id:ident)+) => ({
let (i, o) = $self.$it.parse($input.clone())?;
let (i, o) = $self.$it.parse($input)?;

succ!($it, tuple_trait_inner!($self, i, ( o ), $($id)+))
});
($it:tt, $self:expr, $input:expr, ($($parsed:tt)*), $head:ident $($id:ident)+) => ({
let (i, o) = $self.$it.parse($input.clone())?;
let (i, o) = $self.$it.parse($input)?;

succ!($it, tuple_trait_inner!($self, i, ($($parsed)* , o), $($id)+))
});
($it:tt, $self:expr, $input:expr, ($($parsed:tt)*), $head:ident) => ({
let (i, o) = $self.$it.parse($input.clone())?;
let (i, o) = $self.$it.parse($input)?;

Ok((i, ($($parsed)* , o)))
});
Expand Down

0 comments on commit 5773e90

Please sign in to comment.