Fixed cannot #[Union]
on enum named From
#264
This commit is contained in:
parent
34eaa1d686
commit
36b16217d4
|
@ -77,7 +77,7 @@ pub fn generate(interface_args: &args::Interface, input: &DeriveInput) -> Result
|
|||
|
||||
type_into_impls.push(quote! {
|
||||
#[allow(clippy::all, clippy::pedantic)]
|
||||
impl #generics From<#p> for #ident #generics {
|
||||
impl #generics std::convert::From<#p> for #ident #generics {
|
||||
fn from(obj: #p) -> Self {
|
||||
#ident::#enum_name(obj)
|
||||
}
|
||||
|
|
|
@ -70,7 +70,7 @@ pub fn generate(union_args: &args::Interface, input: &DeriveInput) -> Result<Tok
|
|||
enum_names.push(enum_name);
|
||||
type_into_impls.push(quote! {
|
||||
#[allow(clippy::all, clippy::pedantic)]
|
||||
impl #generics From<#p> for #ident #generics {
|
||||
impl #generics ::std::convert::From<#p> for #ident #generics {
|
||||
fn from(obj: #p) -> Self {
|
||||
#ident::#enum_name(obj)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user