From 3b44533324499d355445b502dfff987da8546f1c Mon Sep 17 00:00:00 2001 From: Viktor Sonesten Date: Tue, 7 Dec 2021 12:53:40 +0100 Subject: feature gates: std-map -> std The alternative is to create another std-* gate for each std-related functionality. I do not think this will scale well, and makes the crate difficult to use. If the end-user wants to use host-side functionality they will only need to specify "std". --- src/peripheral/itm.rs | 2 +- src/peripheral/scb.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/peripheral/itm.rs b/src/peripheral/itm.rs index f155540..f8e9e25 100644 --- a/src/peripheral/itm.rs +++ b/src/peripheral/itm.rs @@ -111,7 +111,7 @@ pub enum LocalTimestampOptions { EnabledDiv64, } -#[cfg(feature = "std-map")] +#[cfg(feature = "std")] impl core::convert::TryFrom for LocalTimestampOptions { type Error = (); diff --git a/src/peripheral/scb.rs b/src/peripheral/scb.rs index 28cfca8..6c16149 100644 --- a/src/peripheral/scb.rs +++ b/src/peripheral/scb.rs @@ -197,7 +197,7 @@ impl SCB { /// Processor core exceptions (internal interrupts) #[derive(Clone, Copy, Debug, Eq, PartialEq)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] -#[cfg_attr(feature = "std-map", derive(PartialOrd, Hash))] +#[cfg_attr(feature = "std", derive(PartialOrd, Hash))] pub enum Exception { /// Non maskable interrupt NonMaskableInt, @@ -264,7 +264,7 @@ impl Exception { /// Active exception number #[derive(Clone, Copy, Debug, Eq, PartialEq)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] -#[cfg_attr(feature = "std-map", derive(PartialOrd, Hash))] +#[cfg_attr(feature = "std", derive(PartialOrd, Hash))] pub enum VectActive { /// Thread mode ThreadMode, -- cgit v1.2.3