Skip to content

Commit 7bfc8e9

Browse files
authored
transcript with Default trait and anotation removed (#204)
Co-authored-by: Pablo Deymonnaz <[email protected]>
1 parent 632cf42 commit 7bfc8e9

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

crypto/src/fiat_shamir/transcript.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,23 @@ pub struct Transcript {
44
hasher: Sha3_256,
55
}
66

7+
impl Default for Transcript {
8+
fn default() -> Self {
9+
Self::new()
10+
}
11+
}
12+
713
impl Transcript {
8-
#[allow(clippy::new_without_default)]
914
pub fn new() -> Self {
1015
Self {
1116
hasher: Sha3_256::new(),
1217
}
1318
}
1419

15-
#[allow(unused)]
1620
pub fn append(&mut self, new_data: &[u8]) {
1721
self.hasher.update(&mut new_data.to_owned());
1822
}
1923

20-
#[allow(unused)]
2124
pub fn challenge(&mut self) -> [u8; 32] {
2225
let mut result_hash = [0_u8; 32];
2326
result_hash.copy_from_slice(&self.hasher.finalize_reset());

0 commit comments

Comments
 (0)