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)
.