diff --git a/commons/zenoh-protocol/src/core/mod.rs b/commons/zenoh-protocol/src/core/mod.rs index 66099ac861..7f2da7e00b 100644 --- a/commons/zenoh-protocol/src/core/mod.rs +++ b/commons/zenoh-protocol/src/core/mod.rs @@ -23,7 +23,6 @@ use core::{ hash::Hash, str::FromStr, }; -use std::error::Error; use serde::Serialize; pub use uhlc::{Timestamp, NTP64}; @@ -456,7 +455,8 @@ impl Display for InvalidReliability { } } -impl Error for InvalidReliability {} +#[cfg(feature = "std")] +impl std::error::Error for InvalidReliability {} impl FromStr for Reliability { type Err = InvalidReliability;