Skip to content

Commit 246493f

Browse files
committed
Set default error type for SignOrCreationError for bindings
The C bindings generator now looks to default generic types as the way to map a struct or enum parameter. Because SignOrCreationError is only used directly with an error type of `()`, we set that to the default and assume no other error types are needed.
1 parent e26c3df commit 246493f

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

lightning-invoice/src/lib.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1322,10 +1322,8 @@ impl std::error::Error for SemanticError { }
13221322

13231323
/// When signing using a fallible method either an user-supplied `SignError` or a `CreationError`
13241324
/// may occur.
1325-
///
1326-
/// (C-not exported) As we don't support unbounded generics
13271325
#[derive(Eq, PartialEq, Debug, Clone)]
1328-
pub enum SignOrCreationError<S> {
1326+
pub enum SignOrCreationError<S = ()> {
13291327
/// An error occurred during signing
13301328
SignError(S),
13311329

0 commit comments

Comments
 (0)