Sometime it’s tricky to get Rust generics right

At least for me. I think I have learned a lot a bout the language, but still so thing did not come up easily – recent example was a generic map, that can use both owned values or references as keys. So basically COW of the type is used as key. So here is the result, which took me while to put together:

Leave a Reply

Your email address will not be published. Required fields are marked *