From 91d11ce614c8a989542ff98ef8862efc60ae9ab3 Mon Sep 17 00:00:00 2001 From: DanGould Date: Tue, 12 Jul 2022 15:06:30 +0800 Subject: [PATCH] Derive Debug In consuming the library at the PayJoin crate, Url not deriving Debug caused compilation issues. --- src/lib.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 7f71ff6..1540b40 100755 --- a/src/lib.rs +++ b/src/lib.rs @@ -57,6 +57,7 @@ pub use ser::{SerializeParams}; /// This struct represents all fields of BIP21 URI with the ability to add more extra fields using /// the `extras` field. By default there are no extra fields so an empty implementation is used. #[non_exhaustive] +#[derive(Debug)] pub struct Uri<'a, Extras = NoExtras> { /// The address provided in the URI. /// @@ -112,7 +113,7 @@ impl<'a, T> Uri<'a, T> { /// without allocation. /// When constructing [`Uri`] to be displayed you may use `From` where `S` is one of various /// stringly types. The conversion is always cheap. -#[derive(Clone)] +#[derive(Debug, Clone)] pub struct Param<'a>(ParamInner<'a>); impl<'a> Param<'a> { @@ -244,7 +245,7 @@ impl<'a> TryFrom> for Cow<'a, str> { } } -#[derive(Clone)] +#[derive(Debug, Clone)] enum ParamInner<'a> { EncodedBorrowed(PercentDecode<'a>), UnencodedBytes(Cow<'a, [u8]>),