diff --git a/fixtures/ext-types/uniffi-one/src/lib.rs b/fixtures/ext-types/uniffi-one/src/lib.rs index 4bf130ad02..cf905f48b4 100644 --- a/fixtures/ext-types/uniffi-one/src/lib.rs +++ b/fixtures/ext-types/uniffi-one/src/lib.rs @@ -34,9 +34,4 @@ fn get_my_proc_macro_type(t: UniffiOneProcMacroType) -> UniffiOneProcMacroType { t } -#[uniffi::export] -async fn get_uniffi_one_async() -> UniffiOneEnum { - UniffiOneEnum::One -} - uniffi::include_scaffolding!("uniffi-one"); diff --git a/uniffi_bindgen/src/bindings/python/templates/EnumTemplate.py b/uniffi_bindgen/src/bindings/python/templates/EnumTemplate.py index 8f0989e634..2a347f873e 100644 --- a/uniffi_bindgen/src/bindings/python/templates/EnumTemplate.py +++ b/uniffi_bindgen/src/bindings/python/templates/EnumTemplate.py @@ -81,6 +81,7 @@ def read(buf): {%- endfor %} raise InternalError("Raw enum value doesn't match any cases") + @staticmethod def check(value): {%- if e.variants().is_empty() %} pass @@ -98,6 +99,7 @@ def check(value): {%- endfor %} {%- endif %} + @staticmethod def write(value, buf): {%- for variant in e.variants() %} {%- if e.is_flat() %}