From bc708fb5a1989c2567bbc49d614f48cfabb2956d Mon Sep 17 00:00:00 2001 From: glihm Date: Thu, 16 May 2024 23:52:17 +0200 Subject: [PATCH] fix: add missing PartialOrd trait (#36) --- crates/cairo-serde/src/types/byte_array.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/crates/cairo-serde/src/types/byte_array.rs b/crates/cairo-serde/src/types/byte_array.rs index efe0a37..820ffdd 100644 --- a/crates/cairo-serde/src/types/byte_array.rs +++ b/crates/cairo-serde/src/types/byte_array.rs @@ -28,7 +28,9 @@ pub const BYTES31_MAX: FieldElement = FieldElement::from_mont([ 576460566199927480, ]); -#[derive(Debug, Clone, Eq, PartialEq, Default, serde::Serialize, serde::Deserialize)] +#[derive( + Debug, Clone, Eq, PartialEq, PartialOrd, Default, serde::Serialize, serde::Deserialize, +)] pub struct Bytes31(FieldElement); impl Bytes31 { @@ -71,7 +73,9 @@ impl CairoSerde for Bytes31 { } } -#[derive(Debug, Clone, Eq, PartialEq, Default, serde::Serialize, serde::Deserialize)] +#[derive( + Debug, Clone, Eq, PartialEq, PartialOrd, Default, serde::Serialize, serde::Deserialize, +)] pub struct ByteArray { pub data: Vec, pub pending_word: FieldElement,