Merge pull request #1740 from TheBlueMatt/2022-09-invoice-bindings-nostd

Don't make references to `std` in `lightning-invoice` in bindings
This commit is contained in:
valentinewallace 2022-09-26 09:22:01 -04:00 committed by GitHub
commit 7bc52aa62c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 2 deletions

View file

@ -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

View file

@ -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 {

View file

@ -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> {