Skip to content

Commit 6cc9aca

Browse files
committed
consolidated phantomdata into one field
1 parent 4fae983 commit 6cc9aca

File tree

3 files changed

+3
-11
lines changed

3 files changed

+3
-11
lines changed

chacha20/src/backends/avx2.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ where
5858
v,
5959
ctr,
6060
_pd: PhantomData,
61-
_variant: PhantomData,
6261
};
6362

6463
f.call(&mut backend);
@@ -94,7 +93,6 @@ where
9493
v,
9594
ctr,
9695
_pd: PhantomData,
97-
_variant: PhantomData
9896
};
9997

10098
backend.rng_gen_par_ks_blocks(buffer);
@@ -106,8 +104,7 @@ where
106104
struct Backend<R: Rounds, V: Variant> {
107105
v: [__m256i; 3],
108106
ctr: [__m256i; N],
109-
_pd: PhantomData<R>,
110-
_variant: PhantomData<V>,
107+
_pd: PhantomData<(R, V)>,
111108
}
112109

113110
#[cfg(feature = "cipher")]

chacha20/src/backends/neon.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@ use cipher::{
2222
struct Backend<R: Rounds, V: Variant> {
2323
state: [uint32x4_t; 4],
2424
ctrs: [uint32x4_t; 4],
25-
_pd: PhantomData<R>,
26-
_variant: PhantomData<V>,
25+
_pd: PhantomData<(R, V)>,
2726
}
2827

2928
macro_rules! add_counter {
@@ -58,7 +57,6 @@ impl<R: Rounds, V: Variant> Backend<R, V> {
5857
state,
5958
ctrs,
6059
_pd: PhantomData,
61-
_variant: PhantomData,
6260
}
6361
}
6462
}

chacha20/src/backends/sse2.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ where
3838
_mm_loadu_si128(state_ptr.add(3)),
3939
],
4040
_pd: PhantomData,
41-
_variant: PhantomData,
4241
};
4342

4443
f.call(&mut backend);
@@ -51,8 +50,7 @@ where
5150

5251
struct Backend<R: Rounds, V: Variant> {
5352
v: [__m128i; 4],
54-
_pd: PhantomData<R>,
55-
_variant: PhantomData<V>,
53+
_pd: PhantomData<(R, V)>,
5654
}
5755

5856
#[cfg(feature = "cipher")]
@@ -120,7 +118,6 @@ where
120118
_mm_loadu_si128(state_ptr.add(3)),
121119
],
122120
_pd: PhantomData,
123-
_variant: PhantomData,
124121
};
125122

126123
backend.gen_ks_blocks(buffer);

0 commit comments

Comments
 (0)