From: Matt Corallo Date: Sat, 17 Aug 2024 15:59:34 +0000 (+0000) Subject: Drop `std::Error` impl for `PeerHandleError` X-Git-Tag: v0.0.124-rc1~18^2~2 X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=75a2089c154b3d354eb2d4b715e9cf05a63d8af2;p=rust-lightning Drop `std::Error` impl for `PeerHandleError` Not sure why we ever really had this, no one really ever bounds anything on `std::Error` and its kinda a dead type, so there's no need for us to `impl` it for our types. --- diff --git a/lightning/src/ln/peer_handler.rs b/lightning/src/ln/peer_handler.rs index 6b03b3654..367a372f2 100644 --- a/lightning/src/ln/peer_handler.rs +++ b/lightning/src/ln/peer_handler.rs @@ -47,8 +47,6 @@ use core::sync::atomic::{AtomicBool, AtomicU32, AtomicI32, Ordering}; use core::{cmp, hash, fmt, mem}; use core::ops::Deref; use core::convert::Infallible; -#[cfg(feature = "std")] -use std::error; #[cfg(not(c_bindings))] use { crate::ln::channelmanager::{SimpleArcChannelManager, SimpleRefChannelManager}, @@ -497,13 +495,6 @@ impl fmt::Display for PeerHandleError { } } -#[cfg(feature = "std")] -impl error::Error for PeerHandleError { - fn description(&self) -> &str { - "Peer Sent Invalid Data" - } -} - enum InitSyncTracker{ NoSyncRequested, ChannelsSyncing(u64),