Skip to content

Commit

Permalink
fix nightly clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
stelzo committed Jun 21, 2024
1 parent 94991c7 commit a295a36
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
6 changes: 4 additions & 2 deletions rpcl2/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
Expand Down

0 comments on commit a295a36

Please sign in to comment.