sfackler/rust-phf — pull request #32 by sp3d (2014-12-11 22:13:18+00:00)
Title: add support for [u8, ..N] keys

This implements PhfHash for [u8, ..1] up to [u8, ..32]. I'd prefer to support [T, ..N] for any T: PhfHash and integral N, but given the lack of variadic generics that isn't possible. It might be able to rework this to have the T: PhfHash part work, though. That said, it would be more work and it isn't necessarily obvious that hashing more complex structures would be very useful, while the need for various sizes of immediate byte literals is more likely to occur in practice.

I also added a test to check to make sure that array values work as output values for hashing--that seems to work nicely even without the other changes, but I figure the test can't hurt.