Skip to content

Commit

Permalink
Drop unnecessary LDKNode type alias completely
Browse files Browse the repository at this point in the history
... now that we don't have any generic to hide, we can just use the
`Node` type directly.
  • Loading branch information
tnull committed Apr 22, 2024
1 parent 68e1b56 commit 3b9437e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
4 changes: 2 additions & 2 deletions bindings/ldk_node.udl
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ interface Builder {
[Throws=BuildError]
void set_listening_addresses(sequence<SocketAddress> listening_addresses);
[Throws=BuildError]
LDKNode build();
Node build();
};

interface LDKNode {
interface Node {
[Throws=NodeError]
void start();
[Throws=NodeError]
Expand Down
6 changes: 1 addition & 5 deletions src/uniffi_types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use crate::UniffiCustomTypeConverter;

use crate::error::Error;
use crate::hex_utils;
use crate::{Node, SocketAddress, UserChannelId};
use crate::{SocketAddress, UserChannelId};

use bitcoin::hashes::sha256::Hash as Sha256;
use bitcoin::hashes::Hash;
Expand All @@ -23,10 +23,6 @@ use lightning_invoice::{Bolt11Invoice, SignedRawBolt11Invoice};
use std::convert::TryInto;
use std::str::FromStr;

/// This type alias is required as Uniffi doesn't support generics, i.e., we can only expose the
/// concretized types via this aliasing hack.
pub type LDKNode = Node;

impl UniffiCustomTypeConverter for PublicKey {
type Builtin = String;

Expand Down

0 comments on commit 3b9437e

Please sign in to comment.