Skip to content

Commit 11bd6e0

Browse files
rursprungeldruin
authored andcommitted
update to edition 2021 & set rust-version
so far the crate used the default edition (2015). upgrading to the newest edition before having the first major release creates a stable platform on which to build in the future. the current edition is also already two years old, so it is likely that most consumers are already using a compatible rust version. for those which might not have upgraded it remains an option to use an existing release of the crate for the time being. setting [`rust-version`] allows having cleaner error messages for those using older rust compilers - though as of now this will not be particularly helpful as the field is only supported starting with rust 1.56 which is also the version introducing support for the 2021 edition. nevertheless, already specifying it now creates a base for future MSRV updates. note: all code changes were done by running `cargo fix --edition` as per the [upgrade guide]. [upgrade guide]: https://doc.rust-lang.org/edition-guide/editions/transitioning-an-existing-project-to-a-new-edition.html [`rust-version`]: https://doc.rust-lang.org/cargo/reference/manifest.html#the-rust-version-field
1 parent 5974faf commit 11bd6e0

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,5 @@ license = "MIT OR Apache-2.0"
77
name = "hash32"
88
repository = "https://github.com/rust-embedded-community/hash32"
99
version = "0.3.1"
10+
edition = "2021"
11+
rust-version = "1.56"

src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ use core::fmt;
5454
use core::hash::BuildHasher;
5555
use core::marker::PhantomData;
5656

57-
pub use fnv::Hasher as FnvHasher;
58-
pub use murmur3::Hasher as Murmur3Hasher;
57+
pub use crate::fnv::Hasher as FnvHasher;
58+
pub use crate::murmur3::Hasher as Murmur3Hasher;
5959

6060
mod fnv;
6161
mod murmur3;

0 commit comments

Comments
 (0)