From eff4d77962c652595f5b4d4a80e6e59bbc7c5ada Mon Sep 17 00:00:00 2001 From: Elias Rohrer Date: Tue, 17 Jun 2025 15:15:43 +0200 Subject: [PATCH] Avoid collision in `Bolt11Invoice::description` When exporting `Display` to bindings, Swift will add a `description` method to the respective object. Unfortunately, this collides with `Bolt11Invoice::description`, which we therefore rename to `Bolt11Invoice::invoice_description`. --- bindings/ldk_node.udl | 2 +- src/ffi/types.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bindings/ldk_node.udl b/bindings/ldk_node.udl index e914fd00e..36767b790 100644 --- a/bindings/ldk_node.udl +++ b/bindings/ldk_node.udl @@ -728,7 +728,7 @@ interface Bolt11Invoice { u64 seconds_until_expiry(); boolean is_expired(); boolean would_expire(u64 at_time_seconds); - Bolt11InvoiceDescription description(); + Bolt11InvoiceDescription invoice_description(); u64 min_final_cltv_expiry_delta(); Network network(); Currency currency(); diff --git a/src/ffi/types.rs b/src/ffi/types.rs index d35f2aa2e..c65bb0599 100644 --- a/src/ffi/types.rs +++ b/src/ffi/types.rs @@ -985,7 +985,7 @@ impl Bolt11Invoice { } /// Return the description or a hash of it for longer ones - pub fn description(&self) -> Bolt11InvoiceDescription { + pub fn invoice_description(&self) -> Bolt11InvoiceDescription { self.inner.description().into() }