I'm wondering if there is a way to use get with a non-static key. It seems the signature of get doesn't require a static lifetime, but the compiler still rejects my attempt to use a non-static str:
490 | fn combined_phf(input: &Vec<&str>){
| ---------- help: add explicit lifetime `'static` to the type of `input`: `&std::vec::Vec<&'static str>`
...
493 | result += EVENTS.get(x).unwrap();
| ^^^ lifetime `'static` required
This looks almost exactly like the case from the README (I've edited previous comment and added a link), it should work. The error is very weird... Please share the whole code if possible or provide a link to the playground.
Btw, are you sure x is &str and not &&str or &String? Wild guess – try get(*x).