From 571d31fec750f7ccfa9773bb62ab31c00246437a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20Kj=C3=A4ll?= Date: Tue, 21 Nov 2023 17:18:22 +0000 Subject: [PATCH] ed25519: use `u64` instead of `usize` in test (#761) --- ed25519/tests/serde.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ed25519/tests/serde.rs b/ed25519/tests/serde.rs index 93f0ebce..cc836a78 100644 --- a/ed25519/tests/serde.rs +++ b/ed25519/tests/serde.rs @@ -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[..]); } @@ -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()