Skip to content

Commit 2a52230

Browse files
committed
Style fixes.
See #1575
1 parent 7ba2cae commit 2a52230

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/codegen/mod.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -2185,7 +2185,7 @@ pub enum EnumVariation {
21852185
impl EnumVariation {
21862186
fn is_rust(&self) -> bool {
21872187
match *self {
2188-
EnumVariation::Rust{ non_exhaustive: _ } => true,
2188+
EnumVariation::Rust{ .. } => true,
21892189
_ => false
21902190
}
21912191
}
@@ -2285,7 +2285,7 @@ impl<'a> EnumBuilder<'a> {
22852285
}
22862286
}
22872287

2288-
EnumVariation::Rust { non_exhaustive: _ } => {
2288+
EnumVariation::Rust { .. } => {
22892289
let tokens = quote!();
22902290
EnumBuilder::Rust {
22912291
codegen_depth: enum_codegen_depth + 1,
@@ -2578,11 +2578,11 @@ impl CodeGenerator for Enum {
25782578

25792579
// TODO(emilio): Delegate this to the builders?
25802580
match variation {
2581-
EnumVariation::Rust { non_exhaustive: nh } => {
2581+
EnumVariation::Rust { non_exhaustive } => {
25822582
attrs.push(attributes::repr(repr_name));
2583-
if nh && ctx.options().rust_features().non_exhaustive {
2583+
if non_exhaustive && ctx.options().rust_features().non_exhaustive {
25842584
attrs.push(attributes::non_exhaustive());
2585-
} else if nh && !ctx.options().rust_features().non_exhaustive {
2585+
} else if non_exhaustive && !ctx.options().rust_features().non_exhaustive {
25862586
panic!("The rust target you're using doesn't seem to support non_exhaustive enums");
25872587
}
25882588
},

0 commit comments

Comments
 (0)