feat(types/try_from_impl): Add a trixy::String from &str impl
This makes it more convenient to use the api.
This commit is contained in:
parent
db5cd1a29b
commit
c69c00e1e9
|
@ -33,6 +33,12 @@ impl From<std::string::String> for String {
|
||||||
String(c_char)
|
String(c_char)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/// Plainly here for convenience
|
||||||
|
impl From<&str> for String {
|
||||||
|
fn from(value: &str) -> Self {
|
||||||
|
value.to_owned().into()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl TryFrom<String> for std::string::String {
|
impl TryFrom<String> for std::string::String {
|
||||||
type Error = crate::types::error::TypeConversionError;
|
type Error = crate::types::error::TypeConversionError;
|
||||||
|
|
Reference in New Issue