poseidon: Remove `M: SpongeMode` from `PhantomData`

`M` was at one point only used as a type marker, but now it stores per-mode state.

Co-authored-by: ying tong <yingtong@z.cash>
This commit is contained in:
str4d 2021-12-15 13:01:53 +00:00 committed by GitHub
parent 423006b905
commit a64e2d64a8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -135,7 +135,7 @@ pub struct Sponge<
chip: PoseidonChip,
mode: M,
state: State<PoseidonChip::Word, T>,
_marker: PhantomData<(M, D)>,
_marker: PhantomData<D>,
}
impl<

View File

@ -186,7 +186,7 @@ pub(crate) struct Sponge<
state: State<F, T>,
mds_matrix: Mds<F, T>,
round_constants: Vec<[F; T]>,
_marker: PhantomData<(S, M)>,
_marker: PhantomData<S>,
}
impl<F: FieldExt, S: Spec<F, T, RATE>, const T: usize, const RATE: usize>