From ccfcb535b1e4df6ede6684eedff4ea13b75cd051 Mon Sep 17 00:00:00 2001 From: Ryan Roden-Corrent Date: Thu, 18 Jan 2024 07:46:21 -0500 Subject: [PATCH] Treat enums as primitive. --- protobuf-codegen/src/gen/field/mod.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/protobuf-codegen/src/gen/field/mod.rs b/protobuf-codegen/src/gen/field/mod.rs index 54e17b843..ac9617289 100644 --- a/protobuf-codegen/src/gen/field/mod.rs +++ b/protobuf-codegen/src/gen/field/mod.rs @@ -198,12 +198,12 @@ impl<'a> FieldGen<'a> { | Type::TYPE_SFIXED32 | Type::TYPE_SFIXED64 | Type::TYPE_SINT32 - | Type::TYPE_SINT64 => true, + | Type::TYPE_SINT64 + | Type::TYPE_ENUM => true, Type::TYPE_STRING | Type::TYPE_GROUP | Type::TYPE_MESSAGE - | Type::TYPE_BYTES - | Type::TYPE_ENUM => false, + | Type::TYPE_BYTES => false, }; let packed = field .field