From a5f56037758108cc958fe647b53bebbe2367b0d2 Mon Sep 17 00:00:00 2001 From: Liam Gray Date: Tue, 26 Nov 2024 20:07:16 +0000 Subject: [PATCH] Fix no-std tests failing to import CanonicalizationScheme --- ciborium/tests/canonical.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ciborium/tests/canonical.rs b/ciborium/tests/canonical.rs index 50dbdfb..5897827 100644 --- a/ciborium/tests/canonical.rs +++ b/ciborium/tests/canonical.rs @@ -7,7 +7,6 @@ use ciborium::tag::Required; use ciborium::value::CanonicalValue; use rand::prelude::*; use std::collections::BTreeMap; -use ciborium::ser::CanonicalizationScheme; macro_rules! cval { ($x:expr) => { @@ -66,7 +65,10 @@ fn map_old() { /// Use length-first ordering for keys. #[test] +#[cfg(feature = "std")] fn map_rfc7049() { + use ciborium::ser::CanonicalizationScheme; + let mut map = BTreeMap::new(); map.insert(cval!(false), val!(2)); map.insert(cval!([-1]), val!(5)); @@ -93,6 +95,8 @@ fn map_rfc7049() { #[test] #[cfg(feature = "std")] fn map_rfc8949() { + use ciborium::ser::CanonicalizationScheme; + let mut map = BTreeMap::new(); map.insert(cval!(false), val!(2)); map.insert(cval!([-1]), val!(5));