You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to use a custom tuple struct as key of my phf map and to do so apparently I need to implement the following traits:
phf_shared::PhfHash
phf_shared::PhfBorrow<B>
phf_shared::FmtConst
I managed to do it by specifying phf_shared both as a dependency and as a build-dependency, but this doesn't seem a really clean solution to me.
Is there any other (cleaner) way to access these traits / use a custom struct as key of the map?
The text was updated successfully, but these errors were encountered:
GyulyVGC
changed the title
Do I really need to specify phf_shared dependency if I want to implement phf traits for a custom struct?
Do I really need to specify phf_shared dependency if I need to use a custom struct as key of a map?
Feb 7, 2024
Hi everybody!
I'd like to use a custom tuple struct as key of my
phf
map and to do so apparently I need to implement the following traits:phf_shared::PhfHash
phf_shared::PhfBorrow<B>
phf_shared::FmtConst
I managed to do it by specifying
phf_shared
both as a dependency and as a build-dependency, but this doesn't seem a really clean solution to me.Is there any other (cleaner) way to access these traits / use a custom struct as key of the map?
The text was updated successfully, but these errors were encountered: