frewsxcv / rust-crates-index

Rust library for retrieving and interacting with the crates.io index
https://docs.rs/crates-index/
Apache License 2.0
72 stars 37 forks source link

Fix hash calculation on 32-bit targets #109

Closed Jake-Shadle closed 1 year ago

Jake-Shadle commented 1 year ago

While doing another PR I noticed this bug in the hash calculation used to find the local index directory for a registry, the use of usize would result in different hashes on 32-bit architectures. Apparently this is not an issue since no one has complained AFAICT, but might as well fix it to potentially save some pain in the future.

See https://github.com/EmbarkStudios/cargo-deny/pull/374