identifiers: add clone from owned reference
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
parent
c4f55b3990
commit
427877d5bc
@ -413,6 +413,13 @@ fn expand_owned_id(input: &ItemStruct, inline_bytes: usize) -> TokenStream {
|
||||
}
|
||||
}
|
||||
|
||||
#[automatically_derived]
|
||||
impl #impl_generics From<&'_ #owned_ty> for #owned_ty {
|
||||
fn from(id: &#owned_ty) -> #owned_ty {
|
||||
id.clone()
|
||||
}
|
||||
}
|
||||
|
||||
#[automatically_derived]
|
||||
impl #impl_generics From<Box<#id_ty>> for #owned_ty {
|
||||
fn from(b: Box<#id_ty>) -> #owned_ty {
|
||||
|
Loading…
x
Reference in New Issue
Block a user