Skip to content

Commit

Permalink
Merge pull request #1740 from TheBlueMatt/2022-09-invoice-bindings-nostd
Browse files Browse the repository at this point in the history
Don't make references to `std` in `lightning-invoice` in bindings
  • Loading branch information
valentinewallace authored Sep 26, 2022
2 parents ed7e30e + 54fa628 commit 7bc52aa
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@ jobs:
cargo test --verbose --color always --no-default-features --features no-std
# check if there is a conflict between no-std and the default std feature
cargo test --verbose --color always --features no-std
# check if there is a conflict between no-std and the c_bindings cfg
RUSTFLAGS="--cfg=c_bindings" cargo test --verbose --color always --no-default-features --features=no-std
# check no-std compatibility across dependencies
cd ..
cd no-std-check
Expand Down
2 changes: 1 addition & 1 deletion lightning-invoice/src/payment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1913,7 +1913,7 @@ mod tests {

#[cfg(c_bindings)]
impl lightning::util::ser::Writeable for TestScorer {
fn write<W: lightning::util::ser::Writer>(&self, _: &mut W) -> Result<(), std::io::Error> { unreachable!(); }
fn write<W: lightning::util::ser::Writer>(&self, _: &mut W) -> Result<(), lightning::io::Error> { unreachable!(); }
}

impl Score for TestScorer {
Expand Down
2 changes: 1 addition & 1 deletion lightning-invoice/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,7 @@ impl<'a, S: Score> ScorerAccountingForInFlightHtlcs<'a, S> {

#[cfg(c_bindings)]
impl<'a, S:Score> lightning::util::ser::Writeable for ScorerAccountingForInFlightHtlcs<'a, S> {
fn write<W: lightning::util::ser::Writer>(&self, writer: &mut W) -> Result<(), std::io::Error> { self.scorer.write(writer) }
fn write<W: lightning::util::ser::Writer>(&self, writer: &mut W) -> Result<(), lightning::io::Error> { self.scorer.write(writer) }
}

impl<'a, S: Score> Score for ScorerAccountingForInFlightHtlcs<'a, S> {
Expand Down

0 comments on commit 7bc52aa

Please sign in to comment.