diff options
author | uk <50893351+unterkontrolle@users.noreply.github.com> | 2019-06-12 17:30:33 -0300 |
---|---|---|
committer | uk <50893351+unterkontrolle@users.noreply.github.com> | 2019-06-12 17:30:33 -0300 |
commit | 2a522304b7302191bff8fe0cb540f8bba0da395c (patch) | |
tree | eeab981d028ba091deffeae70a3c5ef61437a5cc /src/codegen/mod.rs | |
parent | 7ba2cae8c825baf411488ded7d0eb1e6cc17452d (diff) |
Style fixes.
See https://github.com/rust-lang/rust-bindgen/pull/1575
Diffstat (limited to 'src/codegen/mod.rs')
-rw-r--r-- | src/codegen/mod.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/codegen/mod.rs b/src/codegen/mod.rs index 2863387f..15ace9e9 100644 --- a/src/codegen/mod.rs +++ b/src/codegen/mod.rs @@ -2185,7 +2185,7 @@ pub enum EnumVariation { impl EnumVariation { fn is_rust(&self) -> bool { match *self { - EnumVariation::Rust{ non_exhaustive: _ } => true, + EnumVariation::Rust{ .. } => true, _ => false } } @@ -2285,7 +2285,7 @@ impl<'a> EnumBuilder<'a> { } } - EnumVariation::Rust { non_exhaustive: _ } => { + EnumVariation::Rust { .. } => { let tokens = quote!(); EnumBuilder::Rust { codegen_depth: enum_codegen_depth + 1, @@ -2578,11 +2578,11 @@ impl CodeGenerator for Enum { // TODO(emilio): Delegate this to the builders? match variation { - EnumVariation::Rust { non_exhaustive: nh } => { + EnumVariation::Rust { non_exhaustive } => { attrs.push(attributes::repr(repr_name)); - if nh && ctx.options().rust_features().non_exhaustive { + if non_exhaustive && ctx.options().rust_features().non_exhaustive { attrs.push(attributes::non_exhaustive()); - } else if nh && !ctx.options().rust_features().non_exhaustive { + } else if non_exhaustive && !ctx.options().rust_features().non_exhaustive { panic!("The rust target you're using doesn't seem to support non_exhaustive enums"); } }, |