Skip to content

Commit f24fd22

Browse files
committed
Drop unnecessary LDKNode type alias completely
... now that we don't have any generic to hide, we can just use the `Node` type directly.
1 parent 1946042 commit f24fd22

File tree

3 files changed

+4
-8
lines changed

3 files changed

+4
-8
lines changed

bindings/ldk_node.udl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ interface Builder {
3434
[Throws=BuildError]
3535
void set_listening_addresses(sequence<SocketAddress> listening_addresses);
3636
[Throws=BuildError]
37-
LDKNode build();
37+
Node build();
3838
};
3939

40-
interface LDKNode {
40+
interface Node {
4141
[Throws=NodeError]
4242
void start();
4343
[Throws=NodeError]

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ pub use types::ChannelConfig;
108108
pub use io::utils::generate_entropy_mnemonic;
109109

110110
#[cfg(feature = "uniffi")]
111-
use {bip39::Mnemonic, bitcoin::OutPoint, lightning::ln::PaymentSecret, uniffi_types::*};
111+
use {bip39::Mnemonic, bitcoin::OutPoint, lightning::ln::PaymentSecret};
112112

113113
#[cfg(feature = "uniffi")]
114114
pub use builder::ArcedNodeBuilder as Builder;

src/uniffi_types.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use crate::UniffiCustomTypeConverter;
22

33
use crate::error::Error;
44
use crate::hex_utils;
5-
use crate::{Node, SocketAddress, UserChannelId};
5+
use crate::{SocketAddress, UserChannelId};
66

77
use bitcoin::hashes::sha256::Hash as Sha256;
88
use bitcoin::hashes::Hash;
@@ -16,10 +16,6 @@ use bip39::Mnemonic;
1616
use std::convert::TryInto;
1717
use std::str::FromStr;
1818

19-
/// This type alias is required as Uniffi doesn't support generics, i.e., we can only expose the
20-
/// concretized types via this aliasing hack.
21-
pub type LDKNode = Node;
22-
2319
impl UniffiCustomTypeConverter for PublicKey {
2420
type Builtin = String;
2521

0 commit comments

Comments
 (0)