fix nightly clippy

This commit is contained in:
stelzo 2024-06-21 13:33:54 +02:00
parent 94991c720b
commit a295a36060
2 changed files with 5 additions and 3 deletions

View File

@ -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.

View File

@ -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
}
}