diff --git a/codegenerator/rust_cli.py b/codegenerator/rust_cli.py index bc95c04..21d1d23 100644 --- a/codegenerator/rust_cli.py +++ b/codegenerator/rust_cli.py @@ -34,6 +34,7 @@ BASIC_FIELDS = [ "uuid", "state", "status", + "operating_status", ] @@ -276,6 +277,16 @@ class StructFieldResponse(common_rust.StructField): # there is at least "id" field existing in the struct OR the # field is not in the first 10 macros.add("wide") + if ( + self.local_name == "state" + and "status" not in struct.fields.keys() + ): + macros.add("status") + elif ( + self.local_name == "operating_status" + and "status" not in struct.fields.keys() + ): + macros.add("status") if self.data_type.type_hint in [ "Value", "Option",