Skip to content

Commit

Permalink
Rename Punctuated's punctuation type parameter to P
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed May 19, 2024
1 parent 71ce3df commit 1a20798
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/gen_helper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ pub(crate) mod fold {
}
}

impl<T, U> FoldHelper for Punctuated<T, U> {
impl<T, P> FoldHelper for Punctuated<T, P> {
type Item = T;
fn lift<F>(self, mut f: F) -> Self
where
F: FnMut(Self::Item) -> Self::Item,
{
self.into_pairs()
.map(Pair::into_tuple)
.map(|(t, u)| Pair::new(f(t), u))
.map(|(t, p)| Pair::new(f(t), p))
.collect()
}
}
Expand Down

0 comments on commit 1a20798

Please sign in to comment.