Skip to content

Commit

Permalink
ed25519: use u64 instead of usize in test (#761)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexanderkjall authored Nov 21, 2023
1 parent 2f3be45 commit 571d31f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ed25519/tests/serde.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ fn test_serialize_bytes() {
let mut serializer = bincode::Serializer::new(&mut encoded_signature, options);
serde_bytes::serialize(&signature, &mut serializer).unwrap();

let mut expected = Vec::from(Signature::BYTE_SIZE.to_le_bytes());
let mut expected = Vec::from((Signature::BYTE_SIZE as u64).to_le_bytes());
expected.extend(&EXAMPLE_SIGNATURE[..]);
assert_eq!(&expected[..], &encoded_signature[..]);
}
Expand All @@ -48,7 +48,7 @@ fn test_serialize_bytes() {
fn test_deserialize_bytes() {
use bincode::Options;

let mut encoded_signature = Vec::from(Signature::BYTE_SIZE.to_le_bytes());
let mut encoded_signature = Vec::from((Signature::BYTE_SIZE as u64).to_le_bytes());
encoded_signature.extend(&EXAMPLE_SIGNATURE[..]);

let options = bincode::DefaultOptions::new()
Expand Down

0 comments on commit 571d31f

Please sign in to comment.