X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=lightning-rapid-gossip-sync%2Fsrc%2Flib.rs;fp=lightning-rapid-gossip-sync%2Fsrc%2Flib.rs;h=68c451a6372a4d30d63fd39c5a978a54b15c2680;hb=0a14559297f4d1a7dc63f091e8c477eebc86ef11;hp=1a8727a7cd8411bcc567718c8a289125a52a77ff;hpb=8805d0656b6c4a119d9ea49b31924bc44dd66543;p=rust-lightning diff --git a/lightning-rapid-gossip-sync/src/lib.rs b/lightning-rapid-gossip-sync/src/lib.rs index 1a8727a7..68c451a6 100644 --- a/lightning-rapid-gossip-sync/src/lib.rs +++ b/lightning-rapid-gossip-sync/src/lib.rs @@ -72,8 +72,6 @@ extern crate alloc; use std::fs::File; use core::ops::Deref; use core::sync::atomic::{AtomicBool, Ordering}; -use core::fmt::Debug; -use core::fmt::Formatter; use lightning::io; use lightning::ln::msgs::{DecodeError, LightningError}; @@ -84,6 +82,7 @@ use lightning::util::logger::Logger; mod processing; /// All-encompassing standard error type that processing can return +#[derive(Debug)] pub enum GraphSyncError { /// Error trying to read the update data, typically due to an erroneous data length indication /// that is greater than the actual amount of data provided @@ -111,15 +110,6 @@ impl From for GraphSyncError { } } -impl Debug for GraphSyncError { - fn fmt(&self, f: &mut Formatter<'_>) -> core::fmt::Result { - match self { - GraphSyncError::DecodeError(e) => f.write_fmt(format_args!("DecodeError: {:?}", e)), - GraphSyncError::LightningError(e) => f.write_fmt(format_args!("LightningError: {:?}", e)) - } - } -} - /// The main Rapid Gossip Sync object. /// /// See [crate-level documentation] for usage.