Skip to content

Commit

Permalink
Migrate to edition 2021
Browse files Browse the repository at this point in the history
Edition 2021 requires rustc 1.56+ so it's possible.
1. `cargo fix --edition`
2. Field "edition" updated in "Cargo.toml".
  • Loading branch information
Philippe-Cholet committed Jul 4, 2024
1 parent 3067893 commit df6a5c9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ description = "Extra iterator adaptors, iterator methods, free functions, and ma
keywords = ["iterator", "data-structure", "zip", "product"]
categories = ["algorithms", "rust-patterns", "no-std", "no-std::no-alloc"]

edition = "2018"
edition = "2021"

# When bumping, please resolve all `#[allow(clippy::*)]` that are newly resolvable.
rust-version = "1.63.0"
Expand Down
6 changes: 3 additions & 3 deletions tests/specializations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ where
I: Iterator + Clone,
{
macro_rules! check_specialized {
($src:expr, |$it:pat| $closure:expr) => {
($src:expr, |$it:pat_param| $closure:expr) => {
// Many iterators special-case the first elements, so we test specializations for iterators that have already been advanced.
let mut src = $src.clone();
for _ in 0..5 {
Expand Down Expand Up @@ -101,7 +101,7 @@ where
I: DoubleEndedIterator + Clone,
{
macro_rules! check_specialized {
($src:expr, |$it:pat| $closure:expr) => {
($src:expr, |$it:pat_param| $closure:expr) => {
// Many iterators special-case the first elements, so we test specializations for iterators that have already been advanced.
let mut src = $src.clone();
for step in 0..8 {
Expand Down Expand Up @@ -481,7 +481,7 @@ quickcheck! {

fn helper(it: impl DoubleEndedIterator<Item = Result<u8, u8>> + Clone) {
macro_rules! check_results_specialized {
($src:expr, |$it:pat| $closure:expr) => {
($src:expr, |$it:pat_param| $closure:expr) => {
assert_eq!(
itertools::process_results($src.clone(), |$it| $closure),
itertools::process_results($src.clone(), |i| {
Expand Down

0 comments on commit df6a5c9

Please sign in to comment.