Skip to content

Commit 248b480

Browse files
committed
f - fix build errors in no-std
1 parent 8081c46 commit 248b480

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lightning/src/offers/offer.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -456,6 +456,7 @@ mod tests {
456456
assert_eq!(offer.description(), "foo");
457457
assert_eq!(offer.features(), None);
458458
assert_eq!(offer.absolute_expiry(), None);
459+
#[cfg(feature = "std")]
459460
assert!(!offer.is_expired());
460461
assert_eq!(offer.paths(), None);
461462
assert_eq!(offer.issuer(), None);
@@ -576,6 +577,7 @@ mod tests {
576577
let offer = OfferBuilder::new("foo".into(), pubkey())
577578
.absolute_expiry(future_expiry)
578579
.build();
580+
#[cfg(feature = "std")]
579581
assert!(!offer.is_expired());
580582
assert_eq!(offer.absolute_expiry(), Some(future_expiry));
581583
assert_eq!(offer.as_tlv_stream().absolute_expiry, Some(future_expiry.as_secs().into()));
@@ -584,6 +586,7 @@ mod tests {
584586
.absolute_expiry(future_expiry)
585587
.absolute_expiry(past_expiry)
586588
.build();
589+
#[cfg(feature = "std")]
587590
assert!(offer.is_expired());
588591
assert_eq!(offer.absolute_expiry(), Some(past_expiry));
589592
assert_eq!(offer.as_tlv_stream().absolute_expiry, Some(past_expiry.as_secs().into()));

0 commit comments

Comments
 (0)