From ee7306f5654ab6da00b20faac7410e2fc73a4647 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/uniffi_types.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bindings/ldk_node.udl b/bindings/ldk_node.udl index ea4279b6d..a20b49c1f 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/uniffi_types.rs b/src/uniffi_types.rs index f8697e087..535de0ed4 100644 --- a/src/uniffi_types.rs +++ b/src/uniffi_types.rs @@ -531,7 +531,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() }