Skip to content

Commit e6865e6

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 516fefd commit e6865e6

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
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/uniffi_types.rs

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

1212
use crate::error::Error;
1313
use crate::hex_utils;
14-
use crate::{Node, SocketAddress, UserChannelId};
14+
use crate::{SocketAddress, UserChannelId};
1515

1616
use bitcoin::hashes::sha256::Hash as Sha256;
1717
use bitcoin::hashes::Hash;
@@ -23,10 +23,6 @@ use lightning_invoice::{Bolt11Invoice, SignedRawBolt11Invoice};
2323
use std::convert::TryInto;
2424
use std::str::FromStr;
2525

26-
/// This type alias is required as Uniffi doesn't support generics, i.e., we can only expose the
27-
/// concretized types via this aliasing hack.
28-
pub type LDKNode = Node;
29-
3026
impl UniffiCustomTypeConverter for PublicKey {
3127
type Builtin = String;
3228

0 commit comments

Comments
 (0)