Skip to content

Commit

Permalink
Properly query for expose_oneof extension
Browse files Browse the repository at this point in the history
  • Loading branch information
stepancheg committed Apr 12, 2018
1 parent 1535168 commit ae7364d
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions protobuf-codegen/src/message.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
use protobuf::descriptor::*;
use protobuf::descriptorx::*;
use protobuf::rustproto;

use super::enums::*;
use super::rust_types_values::*;
Expand Down Expand Up @@ -52,10 +51,7 @@ impl<'a> MessageGen<'a> {
}

fn expose_oneof(&self) -> bool {
let options = self.message.get_scope().get_file_descriptor().get_options();
rustproto::exts::expose_oneof_all
.get(options)
.unwrap_or(false)
self.customize.expose_oneof.unwrap_or(false)
}

fn oneofs(&'a self) -> Vec<OneofGen<'a>> {
Expand Down

0 comments on commit ae7364d

Please sign in to comment.