From 75a2089c154b3d354eb2d4b715e9cf05a63d8af2 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Sat, 17 Aug 2024 15:59:34 +0000 Subject: [PATCH] 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. --- lightning/src/ln/peer_handler.rs | 9 --------- 1 file changed, 9 deletions(-) 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), -- 2.39.5