string
string copied to clipboard
Add a conversion from `std::string::String` to `String<Bytes>`
This PR implements From<std::string::String> for String<Bytes>, which otherwise requires unsafe.
No conversion is added for String<BytesMut> because there is no implementation of From<Vec<u8>> or From<std::string::String> for BytesMut, as there is for Bytes.
This is a breaking change, surprisingly enough, as demonstrated by the changed test case test_from_std_string. Now that there is more than one possible conversion of std::string::String to String<_>, the _ must be given explicitly; Rust can't infer it any more.