diff --git a/enumflags_derive/src/lib.rs b/enumflags_derive/src/lib.rs index 30c86a1..938a08c 100644 --- a/enumflags_derive/src/lib.rs +++ b/enumflags_derive/src/lib.rs @@ -151,13 +151,18 @@ fn inferred_value(type_name: &Ident, previous_variants: &[Ident], repr: &Ident) } fn infer_values(flags: &mut [Flag], type_name: &Ident, repr: &Ident) { - let mut previous_variants: Vec = flags.iter() + let mut previous_variants: Vec = flags + .iter() .filter(|flag| !flag.value.is_inferred()) - .map(|flag| flag.name.clone()).collect(); + .map(|flag| flag.name.clone()) + .collect(); for flag in flags { if let FlagValue::Inferred(ref mut variant) = flag.value { - variant.discriminant = Some((::default(), inferred_value(type_name, &previous_variants, repr))); + variant.discriminant = Some(( + ::default(), + inferred_value(type_name, &previous_variants, repr), + )); previous_variants.push(flag.name.clone()); } }