diff --git a/CHANGELOG.md b/CHANGELOG.md index 56335a6..1101827 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,7 @@ ## v0.5.0-rc.3 -> v0.5.0 - `PointConvertible` trait is now `unsafe` since the offset is used for raw memory access, where safety can not be guaranteed by the compiler. -- std::error -> core::error for nightly clippy +- Fixes clippy on nightly. - Fixes a bug when attempting to write larger types than available in the message. This now results in a `ExhaustedSource` error. - Adds `repr(C)` to docs where custom conversions are explained to encourage best practices for raw type descriptions. diff --git a/rpcl2/src/lib.rs b/rpcl2/src/lib.rs index 8069664..4bde63d 100644 --- a/rpcl2/src/lib.rs +++ b/rpcl2/src/lib.rs @@ -225,8 +225,10 @@ impl core::fmt::Display for MsgConversionError { } } -impl core::error::Error for MsgConversionError { - fn source(&self) -> Option<&(dyn core::error::Error + 'static)> { +#[allow(clippy::std_instead_of_core)] // will be stable soon (https://github.com/rust-lang/rust/issues/103765) +#[cfg(feature = "std")] +impl std::error::Error for MsgConversionError { + fn source(&self) -> Option<&(dyn std::error::Error + 'static)> { None } }