From 2b5544c19b93638cfb7b04dacbe338e3b9b45f3a Mon Sep 17 00:00:00 2001 From: schwartz-concordium <132270889+schwartz-concordium@users.noreply.github.com> Date: Wed, 24 Jan 2024 16:08:00 +0100 Subject: [PATCH 1/3] make impls public --- .../contracts-common/concordium-contracts-common/src/schema.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/smart-contracts/contracts-common/concordium-contracts-common/src/schema.rs b/smart-contracts/contracts-common/concordium-contracts-common/src/schema.rs index 92324d5e9..1e983878a 100644 --- a/smart-contracts/contracts-common/concordium-contracts-common/src/schema.rs +++ b/smart-contracts/contracts-common/concordium-contracts-common/src/schema.rs @@ -1020,7 +1020,7 @@ pub fn deserial_length(source: &mut impl Read, size_len: SizeLength) -> ParseRes // Versioned schema helpers #[cfg(feature = "derive-serde")] -mod impls { +pub mod impls { use crate::{from_bytes, schema::*}; use base64::{engine::general_purpose, Engine}; From e6b4bf0e474ecbcfac9b0adc3574c9b5852ecf4d Mon Sep 17 00:00:00 2001 From: schwartz-concordium <132270889+schwartz-concordium@users.noreply.github.com> Date: Thu, 25 Jan 2024 08:35:58 +0100 Subject: [PATCH 2/3] Update schema.rs --- .../concordium-contracts-common/src/schema.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/smart-contracts/contracts-common/concordium-contracts-common/src/schema.rs b/smart-contracts/contracts-common/concordium-contracts-common/src/schema.rs index 1e983878a..7d12a1594 100644 --- a/smart-contracts/contracts-common/concordium-contracts-common/src/schema.rs +++ b/smart-contracts/contracts-common/concordium-contracts-common/src/schema.rs @@ -21,6 +21,8 @@ use std::{ convert::{TryFrom, TryInto}, num::TryFromIntError, }; +#[cfg(feature = "derive-serde")] +pub use impls::VersionedSchemaError; /// The `SchemaType` trait provides means to generate a schema for structures. /// Schemas are used to make structures human readable and to avoid dealing @@ -1020,7 +1022,7 @@ pub fn deserial_length(source: &mut impl Read, size_len: SizeLength) -> ParseRes // Versioned schema helpers #[cfg(feature = "derive-serde")] -pub mod impls { +mod impls { use crate::{from_bytes, schema::*}; use base64::{engine::general_purpose, Engine}; From 57be1874d3e557be608acb663392498624e25830 Mon Sep 17 00:00:00 2001 From: schwartz-concordium <132270889+schwartz-concordium@users.noreply.github.com> Date: Thu, 25 Jan 2024 08:40:50 +0100 Subject: [PATCH 3/3] Update schema.rs --- .../concordium-contracts-common/src/schema.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/smart-contracts/contracts-common/concordium-contracts-common/src/schema.rs b/smart-contracts/contracts-common/concordium-contracts-common/src/schema.rs index 7d12a1594..906f6c777 100644 --- a/smart-contracts/contracts-common/concordium-contracts-common/src/schema.rs +++ b/smart-contracts/contracts-common/concordium-contracts-common/src/schema.rs @@ -14,6 +14,8 @@ use core::{ convert::{TryFrom, TryInto}, num::TryFromIntError, }; +#[cfg(feature = "derive-serde")] +pub use impls::VersionedSchemaError; /// Contract schema related types #[cfg(feature = "std")] use std::{ @@ -21,8 +23,6 @@ use std::{ convert::{TryFrom, TryInto}, num::TryFromIntError, }; -#[cfg(feature = "derive-serde")] -pub use impls::VersionedSchemaError; /// The `SchemaType` trait provides means to generate a schema for structures. /// Schemas are used to make structures human readable and to avoid dealing