Skip to content

Commit e8c0d93

Browse files
committed
fix(stackable-versioned): Use trait from core, use correct boolean expr
1 parent 26e5565 commit e8c0d93

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

crates/stackable-versioned-macros/src/codegen/container/enum.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ impl Enum {
180180
quote! {
181181
#automatically_derived
182182
#allow_attribute
183-
impl #impl_generics ::std::convert::From<#from_module_ident::#enum_ident #type_generics> for #for_module_ident::#enum_ident #type_generics
183+
impl #impl_generics ::core::convert::From<#from_module_ident::#enum_ident #type_generics> for #for_module_ident::#enum_ident #type_generics
184184
#where_clause
185185
{
186186
fn from(#from_enum_ident: #from_module_ident::#enum_ident #type_generics) -> Self {

crates/stackable-versioned-macros/src/codegen/container/struct/conversion.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ impl Struct {
101101

102102
quote! {
103103
#automatically_derived
104-
impl ::std::convert::From<#from_module_ident::#object_struct_ident> for #for_module_ident::#object_struct_ident {
104+
impl ::core::convert::From<#from_module_ident::#object_struct_ident> for #for_module_ident::#object_struct_ident {
105105
fn from(#from_struct_parameter_ident: #from_module_ident::#object_struct_ident) -> Self {
106106
#from_inner
107107
}
@@ -551,7 +551,7 @@ impl Struct {
551551
field: "kind".to_owned()
552552
})?;
553553

554-
if kind == #enum_ident_string {
554+
if kind != #enum_ident_string {
555555
return Err(#parse_object_error::UnexpectedKind{
556556
kind: kind.to_owned(),
557557
expected: #enum_ident_string.to_owned(),

0 commit comments

Comments
 (0)