Set default error type for SignOrCreationError for bindings
authorMatt Corallo <git@bluematt.me>
Fri, 30 Apr 2021 18:45:51 +0000 (18:45 +0000)
committerMatt Corallo <git@bluematt.me>
Fri, 30 Apr 2021 19:00:50 +0000 (19:00 +0000)
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.

lightning-invoice/src/lib.rs

index 461ae9b92ad1a9e4d9bb993c13bae59353e89dd0..9535886d97367cc84f0a3792fbfaa871e1667f4e 100644 (file)
@@ -1322,10 +1322,8 @@ impl std::error::Error for SemanticError { }
 
 /// When signing using a fallible method either an user-supplied `SignError` or a `CreationError`
 /// may occur.
-///
-/// (C-not exported) As we don't support unbounded generics
 #[derive(Eq, PartialEq, Debug, Clone)]
-pub enum SignOrCreationError<S> {
+pub enum SignOrCreationError<S = ()> {
        /// An error occurred during signing
        SignError(S),