File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
lightning-liquidity/src/lsps5 Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -461,7 +461,7 @@ pub enum WebhookNotificationMethod {
461461}
462462
463463/// Webhook notification payload.
464- #[ derive( Debug , Clone , PartialEq , Eq ) ]
464+ #[ derive( Clone , PartialEq , Eq ) ]
465465pub struct WebhookNotification {
466466 /// Notification method with parameters.
467467 pub method : WebhookNotificationMethod ,
@@ -499,6 +499,17 @@ impl WebhookNotification {
499499 }
500500}
501501
502+ impl fmt:: Debug for WebhookNotification {
503+ fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
504+ match serde_json:: to_string ( self ) {
505+ Ok ( json) => f. write_str ( & json) ,
506+ // WebhookNotification is well defined and does not contain arbitrary data, so
507+ // this case should never happen.
508+ Err ( _) => f. write_str ( "<failed-to-serialize>" ) ,
509+ }
510+ }
511+ }
512+
502513impl Serialize for WebhookNotification {
503514 fn serialize < S > ( & self , serializer : S ) -> Result < S :: Ok , S :: Error >
504515 where
You can’t perform that action at this time.
0 commit comments