diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index be52e05776c..49b857c39fd 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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 diff --git a/lightning-invoice/src/payment.rs b/lightning-invoice/src/payment.rs index a1c0db58fa4..ee85fab0b5d 100644 --- a/lightning-invoice/src/payment.rs +++ b/lightning-invoice/src/payment.rs @@ -1913,7 +1913,7 @@ mod tests { #[cfg(c_bindings)] impl lightning::util::ser::Writeable for TestScorer { - fn write(&self, _: &mut W) -> Result<(), std::io::Error> { unreachable!(); } + fn write(&self, _: &mut W) -> Result<(), lightning::io::Error> { unreachable!(); } } impl Score for TestScorer { diff --git a/lightning-invoice/src/utils.rs b/lightning-invoice/src/utils.rs index 5faecbfabd7..d7185c999ee 100644 --- a/lightning-invoice/src/utils.rs +++ b/lightning-invoice/src/utils.rs @@ -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(&self, writer: &mut W) -> Result<(), std::io::Error> { self.scorer.write(writer) } + fn write(&self, writer: &mut W) -> Result<(), lightning::io::Error> { self.scorer.write(writer) } } impl<'a, S: Score> Score for ScorerAccountingForInFlightHtlcs<'a, S> {