Skip to content

Commit d0b6199

Browse files
authored
fix: use Display instead of Debug for generated enumeration attributes (#1419)
Prevents the generation of broken code in case the fmt-debug unstable feature is used. Fixes #1418
1 parent 1ba2b73 commit d0b6199

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

prost-build/src/code_generator.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1064,7 +1064,7 @@ impl<'b> CodeGenerator<'_, 'b> {
10641064
Type::Group => Cow::Borrowed("group"),
10651065
Type::Message => Cow::Borrowed("message"),
10661066
Type::Enum => Cow::Owned(format!(
1067-
"enumeration = {:?}",
1067+
"enumeration = \"{}\"",
10681068
self.resolve_ident(field.type_name())
10691069
)),
10701070
}

0 commit comments

Comments
 (0)