billyrieger / bimap-rs

Generic bijective maps in Rust
Apache License 2.0
129 stars 26 forks source link

0.6.2 compilation fails #33

Closed g1mv closed 2 years ago

g1mv commented 2 years ago

Hello and thanks for your library! On compilation I get the following error which is mostly self-explanatory:

error[E0658]: use of unstable library feature 'shrink_to': new API --> bimap-0.6.2/src/hash.rs:335:25 335 self.left2right.shrink_to(min_capacity); ^^^^^^^^^

= note: see issue #56431 https://github.com/rust-lang/rust/issues/56431 for more information

billyrieger commented 2 years ago

Oh, I didn't realize until now that HashMap::shrink_to was only added in Rust 1.56. Are you able to update your Rust install? The current stable release is 1.58.1.

g1mv commented 2 years ago

Yes, that's what I did and it works fine, but I thought you might want to know as in some environments it might not be easy to update (due to ACL restrictions for example etc.). Or maybe you could indicate somewhere that the latest rust version is required for 0.6.2? (1.56 is dated late October 2021 which is quite recent). It's not a major problem anyways, thanks for your reply 😃

billyrieger commented 2 years ago

I will at least add some information to the README about the minimum supported Rust version. Thank you for pointing it out.