Skip to content

Commit 3129b3c

Browse files
committed
Warning fixes
1 parent 10bc388 commit 3129b3c

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

rust/src/lib.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -628,10 +628,6 @@ impl Ed25519KeyHashes {
628628
Self(Vec::new())
629629
}
630630

631-
pub(crate) fn from_vec(vec: Vec<Ed25519KeyHash>) -> Self {
632-
Self(vec)
633-
}
634-
635631
pub fn len(&self) -> usize {
636632
self.0.len()
637633
}

rust/src/tx_builder.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5248,21 +5248,21 @@ mod tests {
52485248
), 1);
52495249

52505250
assert_eq!(count_fake_witnesses_with_required_signers(
5251-
&Ed25519KeyHashes::from_vec(vec![fake_key_hash(1)]),
5251+
&Ed25519KeyHashes(vec![fake_key_hash(1)]),
52525252
), 2);
52535253

52545254
assert_eq!(count_fake_witnesses_with_required_signers(
5255-
&Ed25519KeyHashes::from_vec(vec![fake_key_hash(1), fake_key_hash(2)]),
5255+
&Ed25519KeyHashes(vec![fake_key_hash(1), fake_key_hash(2)]),
52565256
), 3);
52575257

52585258
// This case still produces only 3 fake signatures, because the same key is already used in the input address
52595259
assert_eq!(count_fake_witnesses_with_required_signers(
5260-
&Ed25519KeyHashes::from_vec(vec![fake_key_hash(1), fake_key_hash(2), fake_key_hash(0)]),
5260+
&Ed25519KeyHashes(vec![fake_key_hash(1), fake_key_hash(2), fake_key_hash(0)]),
52615261
), 3);
52625262

52635263
// When a different key is used - 4 fake witnesses are produced
52645264
assert_eq!(count_fake_witnesses_with_required_signers(
5265-
&Ed25519KeyHashes::from_vec(vec![fake_key_hash(1), fake_key_hash(2), fake_key_hash(3)]),
5265+
&Ed25519KeyHashes(vec![fake_key_hash(1), fake_key_hash(2), fake_key_hash(3)]),
52665266
), 4);
52675267
}
52685268

0 commit comments

Comments
 (0)