Skip to content

Commit f778377

Browse files
committed
Drop manual Debug impl on RGS' GraphSyncError
As it does the same thing as a derived `Debug` does anyway.
1 parent a78db46 commit f778377

File tree

1 file changed

+1
-11
lines changed
  • lightning-rapid-gossip-sync/src

1 file changed

+1
-11
lines changed

lightning-rapid-gossip-sync/src/lib.rs

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,6 @@ extern crate alloc;
7272
use std::fs::File;
7373
use core::ops::Deref;
7474
use core::sync::atomic::{AtomicBool, Ordering};
75-
use core::fmt::Debug;
76-
use core::fmt::Formatter;
7775

7876
use lightning::io;
7977
use lightning::ln::msgs::{DecodeError, LightningError};
@@ -84,6 +82,7 @@ use lightning::util::logger::Logger;
8482
mod processing;
8583

8684
/// All-encompassing standard error type that processing can return
85+
#[derive(Debug)]
8786
pub enum GraphSyncError {
8887
/// Error trying to read the update data, typically due to an erroneous data length indication
8988
/// that is greater than the actual amount of data provided
@@ -111,15 +110,6 @@ impl From<LightningError> for GraphSyncError {
111110
}
112111
}
113112

114-
impl Debug for GraphSyncError {
115-
fn fmt(&self, f: &mut Formatter<'_>) -> core::fmt::Result {
116-
match self {
117-
GraphSyncError::DecodeError(e) => f.write_fmt(format_args!("DecodeError: {:?}", e)),
118-
GraphSyncError::LightningError(e) => f.write_fmt(format_args!("LightningError: {:?}", e))
119-
}
120-
}
121-
}
122-
123113
/// The main Rapid Gossip Sync object.
124114
///
125115
/// See [crate-level documentation] for usage.

0 commit comments

Comments
 (0)