identifiers: Implement From<&Id> for String
This commit is contained in:
parent
d5656f3399
commit
ed92a4fbd7
@ -113,6 +113,12 @@ pub fn expand_id_zst(input: ItemStruct) -> syn::Result<TokenStream> {
|
||||
}
|
||||
}
|
||||
|
||||
impl From<&#id> for String {
|
||||
fn from(id: &#id) -> Self {
|
||||
id.as_str().to_owned()
|
||||
}
|
||||
}
|
||||
|
||||
impl From<Box<#id>> for String {
|
||||
fn from(id: Box<#id>) -> Self {
|
||||
id.into_owned().into()
|
||||
|
Loading…
x
Reference in New Issue
Block a user