From fcc735765c3fcd166199f81f3da3ba17ea988de1 Mon Sep 17 00:00:00 2001 From: colin Date: Thu, 21 Jul 2022 22:21:35 -0700 Subject: [PATCH] types: Enum: simplify the `internally_discriminanted` constructor we don't actually need to enforce the discriminant codability in the constructor. if the conditions aren't met, the user just won't be able to operate on the enum. --- crates/types/src/compound/enumerated.rs | 2 -- 1 file changed, 2 deletions(-) diff --git a/crates/types/src/compound/enumerated.rs b/crates/types/src/compound/enumerated.rs index 1106c9d..5519da5 100644 --- a/crates/types/src/compound/enumerated.rs +++ b/crates/types/src/compound/enumerated.rs @@ -141,8 +141,6 @@ impl Enum<(), L> { pub fn internally_discriminated(v: Variants) -> Self where Variants: IntoList, - L: list::Meta + Indexable, - list::ElementAt: DiscriminantCodable<::Length>, { Enum((), v.into_list()) }