Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

phf-generator - tests fail with criterion feature. #292

Open
plugwash opened this issue Jul 24, 2023 · 0 comments
Open

phf-generator - tests fail with criterion feature. #292

plugwash opened this issue Jul 24, 2023 · 0 comments

Comments

@plugwash
Copy link

While working on updating the rust phf packages in Debian I discovered that the phf_generator crate fails to build when the criterion feature is enabled. I bisected this to 6d5bfb4 "update to rand 0.8".

Anyway, fixing the code I found two problems. The first is that the "Alphanumeric" distribution now returns u8 rather than char. The second is that "generate_hash" only accepts strings if the "std" feature in phf_shared is enabled.

I fixed the first by adding a ".map(char::from)" and the second by making the criterion feature in phf_generator depend on the std feature is phf_shared

The patch I intend to upload to Debian is at https://salsa.debian.org/rust-team/debcargo-conf/-/blob/master/src/phf-generator/debian/patches/fix-criterion-feature.patch

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

No branches or pull requests

1 participant