Skip to content

Commit 95c4eaf

Browse files
authored
Merge pull request #4212 from jkczyz/2025-11-fix-warnings
Fix build warnings under rustc 1.75.0
2 parents 08c2236 + 2338805 commit 95c4eaf

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

lightning/src/offers/offer.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ impl MetadataStrategy for DerivedMetadata {}
220220

221221
macro_rules! offer_explicit_metadata_builder_methods {
222222
(
223-
$self: ident, $self_type: ty, $return_type: ty, $return_value: expr
223+
$self: ident, $self_type: ty, $return_type: ty, $return_value: expr $(, $mut: tt)?
224224
) => {
225225
/// Creates a new builder for an offer using the `signing_pubkey` for signing invoices. The
226226
/// associated secret key must be remembered while the offer is valid.
@@ -259,7 +259,7 @@ macro_rules! offer_explicit_metadata_builder_methods {
259259
///
260260
/// Successive calls to this method will override the previous setting.
261261
pub fn metadata(
262-
mut $self: $self_type, metadata: Vec<u8>,
262+
$($mut)? $self: $self_type, metadata: Vec<u8>,
263263
) -> Result<$return_type, Bolt12SemanticError> {
264264
$self.offer.metadata = Some(Metadata::Bytes(metadata));
265265
Ok($return_value)
@@ -523,7 +523,7 @@ impl<'a, M: MetadataStrategy, T: secp256k1::Signing> OfferBuilder<'a, M, T> {
523523
}
524524

525525
impl<'a> OfferBuilder<'a, ExplicitMetadata, secp256k1::SignOnly> {
526-
offer_explicit_metadata_builder_methods!(self, Self, Self, self);
526+
offer_explicit_metadata_builder_methods!(self, Self, Self, self, mut);
527527
}
528528

529529
impl<'a, T: secp256k1::Signing> OfferBuilder<'a, DerivedMetadata, T> {

lightning/src/sync/debug_sync.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ use parking_lot::Condvar as StdCondvar;
1616
use parking_lot::Mutex as StdMutex;
1717
use parking_lot::MutexGuard as StdMutexGuard;
1818

19+
#[cfg(feature = "std")]
1920
pub use parking_lot::WaitTimeoutResult;
2021

2122
use crate::prelude::*;

0 commit comments

Comments
 (0)