Skip to content

Commit

Permalink
Derive Debug for oneof enums
Browse files Browse the repository at this point in the history
  • Loading branch information
stepancheg committed Apr 14, 2019
1 parent 4c31dd6 commit 8a9c5ee
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions protobuf-codegen/src/oneof.rs
Expand Up @@ -160,10 +160,7 @@ impl<'a> OneofGen<'a> {
}

fn write_enum(&self, w: &mut CodeWriter) {
let mut derive = vec!["Clone", "PartialEq"];
if self.lite_runtime {
derive.push("Debug");
}
let derive = vec!["Clone", "PartialEq", "Debug"];
w.derive(&derive);
serde::write_serde_attr(w, &self.customize, "derive(Serialize, Deserialize)");
w.pub_enum(&self.oneof.rust_name().ident.to_string(), |w| {
Expand Down

0 comments on commit 8a9c5ee

Please sign in to comment.