Skip to content

Commit 3ed2d02

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 549d852 commit 3ed2d02

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
@@ -33,10 +33,10 @@ interface Builder {
3333
[Throws=BuildError]
3434
void set_listening_addresses(sequence<SocketAddress> listening_addresses);
3535
[Throws=BuildError]
36-
LDKNode build();
36+
Node build();
3737
};
3838

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

src/lib.rs

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

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

111111
#[cfg(feature = "uniffi")]
112112
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)