string
string copied to clipboard
Implement From<&str> and From<String> for String<Bytes>?
From<&str> and From<String> are only implemented for String<&str> and String<String>. I suppose you can't implement them for generic storage... is there even a trait that makes sense for generic byte storage?
Thoughts on implementing From<&str> and From<String> for String<Bytes>? I'm trying to add a crate feature to enable Bytes storage for quick-protobuf and I'd like to have the tests be generic over the byte storage feature. It seems like "boom".into() is a good fit for Cow::Borrowed("boom") and String::from_str("boom").
I'm not sure off the top of my head, but there may be some coherence problems? Why don't you see if you can add those conversions.