Minor cleanup after #1419.

The previous PR ended up with a lot of just-called-once methods. Just inline
them since they're confusing otherwise.

Also avoid testing all the variants of an enum if there was a match already, or
if the enum is not anonymous. This is mostly a minor optimization.
diff --git a/src/ir/enum_ty.rs b/src/ir/enum_ty.rs
index 6d1e721..f3da219 100644
--- a/src/ir/enum_ty.rs
+++ b/src/ir/enum_ty.rs
@@ -143,46 +143,29 @@
         let path = item.canonical_path(ctx);
         let enum_ty = item.expect_type();
 
-        let path_matches = enums.matches(&path[1..].join("::"));
-        let enum_is_anon = enum_ty.name().is_none();
-        let a_variant_matches = self.variants().iter().any(|v| {
-            enums.matches(&v.name())
-        });
-        path_matches || (enum_is_anon && a_variant_matches)
-    }
+        if enums.matches(&path[1..].join("::")) {
+            return true;
+        }
 
-    /// Whether the enum was explicitly specified to be a bitfield.
-    fn is_bitfield(&self, ctx: &BindgenContext, item: &Item) -> bool {
-        self.is_matching_enum(ctx, &ctx.options().bitfield_enums, item)
-    }
+        // Test the variants if the enum is anonymous.
+        if enum_ty.name().is_some() {
+            return false;
+        }
 
-    /// Whether the enum was explicitly specified to be an constified enum
-    /// module.
-    fn is_constified_enum_module(&self, ctx: &BindgenContext, item: &Item) -> bool {
-        self.is_matching_enum(ctx, &ctx.options().constified_enum_modules, item)
-    }
-
-    /// Whether the enum was explicitly specified to be an set of constants.
-    fn is_constified_enum(&self, ctx: &BindgenContext, item: &Item) -> bool {
-        self.is_matching_enum(ctx, &ctx.options().constified_enums, item)
-    }
-
-    /// Whether the enum was explicitly specified to be a Rust enum.
-    fn is_rustified_enum(&self, ctx: &BindgenContext, item: &Item) -> bool {
-        self.is_matching_enum(ctx, &ctx.options().rustified_enums, item)
+        self.variants().iter().any(|v| enums.matches(&v.name()))
     }
 
     /// Returns the final representation of the enum.
     pub fn computed_enum_variation(&self, ctx: &BindgenContext, item: &Item) -> EnumVariation {
         // ModuleConsts has higher precedence before Rust in order to avoid
         // problems with overlapping match patterns.
-        if self.is_constified_enum_module(ctx, item) {
+        if self.is_matching_enum(ctx, &ctx.options().constified_enum_modules, item) {
             EnumVariation::ModuleConsts
-        } else if self.is_bitfield(ctx, item) {
+        } else if self.is_matching_enum(ctx, &ctx.options().bitfield_enums, item) {
             EnumVariation::Bitfield
-        } else if self.is_rustified_enum(ctx, item) {
+        } else if self.is_matching_enum(ctx, &ctx.options().rustified_enums, item) {
             EnumVariation::Rust
-        } else if self.is_constified_enum(ctx, item) {
+        } else if self.is_matching_enum(ctx, &ctx.options().constified_enums, item) {
             EnumVariation::Consts
         } else {
             ctx.options().default_enum_style