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.
This commit is contained in:
2022-07-21 22:21:35 -07:00
parent 55e58f630c
commit fcc735765c

View File

@@ -141,8 +141,6 @@ impl<L> Enum<(), L> {
pub fn internally_discriminated<Variants>(v: Variants) -> Self
where
Variants: IntoList<List=L>,
L: list::Meta + Indexable<P0>,
list::ElementAt<P0, L>: DiscriminantCodable<<L as list::Meta>::Length>,
{
Enum((), v.into_list())
}