Skip to content

Commit cd16709

Browse files
committed
Remove PhantomData when not needed.
1 parent 914042c commit cd16709

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

src/toolbox/sigma/fiat_shamir.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
use std::marker::PhantomData;
21
use rand::{RngCore, CryptoRng};
32
use crate::toolbox::sigma::SigmaProtocol;
43
use crate::toolbox::sigma::transcript::TranscriptCodec;
@@ -13,7 +12,6 @@ where
1312
domain_sep: Vec<u8>,
1413
hash_state: C,
1514
sigmap: P,
16-
_marker: PhantomData<<G as Group>::Scalar>,
1715
}
1816

1917
impl<P, C, G> NISigmaProtocol<P, C, G>
@@ -26,7 +24,7 @@ where
2624
pub fn new(iv: &[u8], instance: P) -> Self {
2725
let domain_sep = iv.to_vec();
2826
let hash_state = C::new(iv);
29-
Self { domain_sep, hash_state, sigmap: instance, _marker: PhantomData }
27+
Self { domain_sep, hash_state, sigmap: instance }
3028
}
3129

3230
// Generate new non-interactive proof
@@ -64,6 +62,6 @@ where
6462
println!("Verifier's challenge : {:?}", challenge);
6563
// Verification of the proof
6664
self.sigmap.verifier(&commitment, &challenge, &response)
67-
65+
6866
}
6967
}

src/toolbox/sigma/group_morphism.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
use std::marker::PhantomData;
21
use group::{Group, GroupEncoding};
32

43
pub struct LinearCombination {
@@ -54,7 +53,6 @@ where
5453
{
5554
pub morphism: Morphism<G>,
5655
pub image: Vec<usize>,
57-
_marker: PhantomData<G>,
5856
}
5957

6058
impl<G> GroupMorphismPreimage<G>
@@ -65,7 +63,6 @@ where
6563
Self {
6664
morphism: Morphism::new(),
6765
image: Vec::new(),
68-
_marker: PhantomData,
6966
}
7067
}
7168

0 commit comments

Comments
 (0)