Skip to content

Commit e7678d4

Browse files
committed
derive(Debug) on Events
We'd previously largely not turned on derive(Debug) on any of our structs, but not for good reason. Especially for Events objects, Debug can be a very useful for users to quickly print what they received from us without having to write out a large match.
1 parent 640ae63 commit e7678d4

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

lightning/src/chain/keysinterface.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ use ln::msgs::DecodeError;
4545
/// spend on-chain. The information needed to do this is provided in this enum, including the
4646
/// outpoint describing which txid and output index is available, the full output which exists at
4747
/// that txid/index, and any keys or other information required to sign.
48-
#[derive(Clone, PartialEq)]
48+
#[derive(Clone, Debug, PartialEq)]
4949
pub enum SpendableOutputDescriptor {
5050
/// An output to a script which was provided via KeysInterface, thus you should already know
5151
/// how to spend it. No keys are provided as rust-lightning was never given any keys - only the

lightning/src/util/events.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ use std::time::Duration;
3131
/// Note that while Writeable and Readable are implemented for Event, you probably shouldn't use
3232
/// them directly as they don't round-trip exactly (for example FundingGenerationReady is never
3333
/// written as it makes no sense to respond to it after reconnecting to peers).
34+
#[derive(Debug)]
3435
pub enum Event {
3536
/// Used to indicate that the client should generate a funding transaction with the given
3637
/// parameters and then call ChannelManager::funding_transaction_generated.

0 commit comments

Comments
 (0)