Skip to content

Conversation

clint-white
Copy link
Contributor

Resolves #37.

This migrates the crate to the Rust 2021 edition and increases the MSRV to 1.56.0, as discussed in #34.

Now that Rust 1.56.0 is required, we can remove build.rs and the remaining uses of conditional compilation. We also port two more changes from std that were not part of #34 because of version requirements:

  • Use usize::BITS instead of 8 * std::mem::size_of::<usize>().
  • Use arrays instead of vectors in documentation examples when creating binary heaps from lists of known values.

Finally, while not exactly related to the edition migration, this PR includes a few other small fixes:

- Change edition to 2021
- Increase MSRV to 1.56.0
- Remove `build.rs`, build-dependency on `autocfg`, and conditional
  compilation of methods requiring at least 1.56.0
- Update the CI matrix
This ports rust-lang/rust@1e2dba1e, part of rust-lang/rust#76492.
`usize::BITS` was stabilized in Rust 1.53.0.
This change is ported from rust-lang/rust#91861.  Also finish porting
rust-lang/rust#84111, partially ported here in sekineh#34, by including the
example of constructing a binary heap from an array.
This change was made in rust-lang/rust@857530ce, part of the
transition of liballoc to the 2018 edition.  Overlooked here in sekineh#34.
@sekineh sekineh merged commit 34c14de into sekineh:master Sep 29, 2022
@clint-white clint-white deleted the 2021-edition branch October 1, 2022 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Migrate to Edition 2021
2 participants