diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 98c77507..efcb2066 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -48,6 +48,11 @@ jobs: - uses: dtolnay/rust-toolchain@master with: toolchain: ${{ matrix.rust }} + - name: Downgrade dependencies + if: matrix.rust == '1.63.0' + run: | + cargo generate-lockfile + cargo update -p hashbrown --precise 0.15.0 - name: Tests run: | cargo build --verbose --features "${{ matrix.features }}" @@ -83,6 +88,11 @@ jobs: with: toolchain: ${{ matrix.rust }} target: ${{ matrix.target }} + - name: Downgrade dependencies + if: matrix.rust == '1.63.0' + run: | + cargo generate-lockfile + cargo update -p hashbrown --precise 0.15.0 - name: Tests run: | cargo build -vv --target=${{ matrix.target }} --no-default-features diff --git a/Cargo.toml b/Cargo.toml index 959ea4c6..9e22c312 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -20,7 +20,7 @@ arbitrary = { version = "1.0", optional = true, default-features = false } quickcheck = { version = "1.0", optional = true, default-features = false } serde = { version = "1.0", optional = true, default-features = false } borsh = { version = "1.2", optional = true, default-features = false } -rayon = { version = "1.5.3", optional = true } +rayon = { version = "1.9", optional = true } # Internal feature, only used when building as part of rustc, # not part of the stable interface of this crate. diff --git a/src/rayon/mod.rs b/src/rayon/mod.rs index 1d21569c..84ce02db 100644 --- a/src/rayon/mod.rs +++ b/src/rayon/mod.rs @@ -12,18 +12,5 @@ pub mod set; // This form of intermediate collection is also how Rayon collects `HashMap`. // Note that the order will also be preserved! fn collect(iter: I) -> LinkedList> { - iter.into_par_iter() - .fold(Vec::new, |mut vec, elem| { - vec.push(elem); - vec - }) - .map(|vec| { - let mut list = LinkedList::new(); - list.push_back(vec); - list - }) - .reduce(LinkedList::new, |mut list1, mut list2| { - list1.append(&mut list2); - list1 - }) + iter.into_par_iter().collect_vec_list() }