3 ms·
You can use impl Borrow<T> for that if the choice is static. If it's dynamic, you can use Cow or the supercow/bos/... crates if you want Arc/Rc to be options a
by devit 3y ago
You can use impl Borrow<T> for that if the choice is static.
If it's dynamic, you can use Cow or the supercow/bos/... crates if you want Arc/Rc to be options as well.
- adam_arthur 3y agoI forget the specifics at the moment, but impl Borrow didn't work for my case, I definitely tried it and expected it to work though. I'll check the Cow crate.