Merge rust-bitcoin/rust-bitcoin#4607: Manual update to rustc (to nightly-2025-06-06)
47c07c39fb
Manual update to rustc (to nightly-2025-06-06) (Jamil Lambert, PhD)69ce8f448b
Remove unneeded return statement (Jamil Lambert, PhD)8e60711265
Use the anonymous lifetime for paths (Jamil Lambert, PhD) Pull request description: Automated daily update to rustc #4598 failed CI due to new clipply lints. Fix the lints and update nightly: - Use the anonymous lifetime for paths. - Remove the unneeded return statement. - Update to `nightly-2025-06-06` ACKs for top commit: tcharding: ACK47c07c39fb
apoelstra: ACK 47c07c39fb2af99c348124d45a3cb8f92deb60dd; successfully ran local tests Tree-SHA512: 22e9e7809c20f864233c12c0cb096cd1e1c364161b769b6905c1b0a8ed03409c59a48c058dbd05e0dc064f7caff82d3e61f57d5b49df94ea86d09e54441fe380
This commit is contained in:
commit
502a9d1ec4
|
@ -416,17 +416,17 @@ impl DerivationPath {
|
||||||
|
|
||||||
/// Get an [Iterator] over the children of this [DerivationPath]
|
/// Get an [Iterator] over the children of this [DerivationPath]
|
||||||
/// starting with the given [ChildNumber].
|
/// starting with the given [ChildNumber].
|
||||||
pub fn children_from(&self, cn: ChildNumber) -> DerivationPathIterator {
|
pub fn children_from(&self, cn: ChildNumber) -> DerivationPathIterator<'_> {
|
||||||
DerivationPathIterator::start_from(self, cn)
|
DerivationPathIterator::start_from(self, cn)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Get an [Iterator] over the unhardened children of this [DerivationPath].
|
/// Get an [Iterator] over the unhardened children of this [DerivationPath].
|
||||||
pub fn normal_children(&self) -> DerivationPathIterator {
|
pub fn normal_children(&self) -> DerivationPathIterator<'_> {
|
||||||
DerivationPathIterator::start_from(self, ChildNumber::Normal { index: 0 })
|
DerivationPathIterator::start_from(self, ChildNumber::Normal { index: 0 })
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Get an [Iterator] over the hardened children of this [DerivationPath].
|
/// Get an [Iterator] over the hardened children of this [DerivationPath].
|
||||||
pub fn hardened_children(&self) -> DerivationPathIterator {
|
pub fn hardened_children(&self) -> DerivationPathIterator<'_> {
|
||||||
DerivationPathIterator::start_from(self, ChildNumber::Hardened { index: 0 })
|
DerivationPathIterator::start_from(self, ChildNumber::Hardened { index: 0 })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -331,7 +331,7 @@ crate::internal_macros::define_extension_trait! {
|
||||||
///
|
///
|
||||||
/// To force minimal pushes, use [`instructions_minimal`](Self::instructions_minimal).
|
/// To force minimal pushes, use [`instructions_minimal`](Self::instructions_minimal).
|
||||||
#[inline]
|
#[inline]
|
||||||
fn instructions(&self) -> Instructions {
|
fn instructions(&self) -> Instructions<'_> {
|
||||||
Instructions { data: self.as_bytes().iter(), enforce_minimal: false }
|
Instructions { data: self.as_bytes().iter(), enforce_minimal: false }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -340,7 +340,7 @@ crate::internal_macros::define_extension_trait! {
|
||||||
/// This is similar to [`instructions`](Self::instructions) but an error is returned if a push
|
/// This is similar to [`instructions`](Self::instructions) but an error is returned if a push
|
||||||
/// is not minimal.
|
/// is not minimal.
|
||||||
#[inline]
|
#[inline]
|
||||||
fn instructions_minimal(&self) -> Instructions {
|
fn instructions_minimal(&self) -> Instructions<'_> {
|
||||||
Instructions { data: self.as_bytes().iter(), enforce_minimal: true }
|
Instructions { data: self.as_bytes().iter(), enforce_minimal: true }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -352,7 +352,7 @@ crate::internal_macros::define_extension_trait! {
|
||||||
///
|
///
|
||||||
/// To force minimal pushes, use [`Self::instruction_indices_minimal`].
|
/// To force minimal pushes, use [`Self::instruction_indices_minimal`].
|
||||||
#[inline]
|
#[inline]
|
||||||
fn instruction_indices(&self) -> InstructionIndices {
|
fn instruction_indices(&self) -> InstructionIndices<'_> {
|
||||||
InstructionIndices::from_instructions(self.instructions())
|
InstructionIndices::from_instructions(self.instructions())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -361,7 +361,7 @@ crate::internal_macros::define_extension_trait! {
|
||||||
/// This is similar to [`instruction_indices`](Self::instruction_indices) but an error is
|
/// This is similar to [`instruction_indices`](Self::instruction_indices) but an error is
|
||||||
/// returned if a push is not minimal.
|
/// returned if a push is not minimal.
|
||||||
#[inline]
|
#[inline]
|
||||||
fn instruction_indices_minimal(&self) -> InstructionIndices {
|
fn instruction_indices_minimal(&self) -> InstructionIndices<'_> {
|
||||||
InstructionIndices::from_instructions(self.instructions_minimal())
|
InstructionIndices::from_instructions(self.instructions_minimal())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -404,7 +404,7 @@ impl TransactionExt for Transaction {
|
||||||
|
|
||||||
fn is_lock_time_enabled(&self) -> bool { self.input.iter().any(|i| i.enables_lock_time()) }
|
fn is_lock_time_enabled(&self) -> bool { self.input.iter().any(|i| i.enables_lock_time()) }
|
||||||
|
|
||||||
fn script_pubkey_lens(&self) -> TxOutToScriptPubkeyLengthIter {
|
fn script_pubkey_lens(&self) -> TxOutToScriptPubkeyLengthIter<'_> {
|
||||||
TxOutToScriptPubkeyLengthIter { inner: self.output.iter() }
|
TxOutToScriptPubkeyLengthIter { inner: self.output.iter() }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -517,11 +517,11 @@ impl TransactionExtPriv for Transaction {
|
||||||
1
|
1
|
||||||
} else if witness_program.is_p2wsh() {
|
} else if witness_program.is_p2wsh() {
|
||||||
// Treat the last item of the witness as the witnessScript
|
// Treat the last item of the witness as the witnessScript
|
||||||
return witness
|
witness
|
||||||
.last()
|
.last()
|
||||||
.map(Script::from_bytes)
|
.map(Script::from_bytes)
|
||||||
.map(|s| s.count_sigops())
|
.map(|s| s.count_sigops())
|
||||||
.unwrap_or(0);
|
.unwrap_or(0)
|
||||||
} else {
|
} else {
|
||||||
0
|
0
|
||||||
}
|
}
|
||||||
|
|
|
@ -779,7 +779,7 @@ impl TapTree {
|
||||||
|
|
||||||
/// Returns [`TapTreeIter<'_>`] iterator for a Taproot script tree, operating in DFS order over
|
/// Returns [`TapTreeIter<'_>`] iterator for a Taproot script tree, operating in DFS order over
|
||||||
/// tree [`ScriptLeaf`]s.
|
/// tree [`ScriptLeaf`]s.
|
||||||
pub fn script_leaves(&self) -> ScriptLeaves { ScriptLeaves { leaf_iter: self.0.leaf_nodes() } }
|
pub fn script_leaves(&self) -> ScriptLeaves<'_> { ScriptLeaves { leaf_iter: self.0.leaf_nodes() } }
|
||||||
|
|
||||||
/// Returns the root [`TapNodeHash`] of this tree.
|
/// Returns the root [`TapNodeHash`] of this tree.
|
||||||
pub fn root_hash(&self) -> TapNodeHash { self.0.hash }
|
pub fn root_hash(&self) -> TapNodeHash { self.0.hash }
|
||||||
|
@ -951,7 +951,7 @@ impl NodeInfo {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Creates an iterator over all leaves (including hidden leaves) in the tree.
|
/// Creates an iterator over all leaves (including hidden leaves) in the tree.
|
||||||
pub fn leaf_nodes(&self) -> LeafNodes { LeafNodes { leaf_iter: self.leaves.iter() } }
|
pub fn leaf_nodes(&self) -> LeafNodes<'_> { LeafNodes { leaf_iter: self.leaves.iter() } }
|
||||||
|
|
||||||
/// Returns the root [`TapNodeHash`] of this node info.
|
/// Returns the root [`TapNodeHash`] of this node info.
|
||||||
pub fn node_hash(&self) -> TapNodeHash { self.hash }
|
pub fn node_hash(&self) -> TapNodeHash { self.hash }
|
||||||
|
|
|
@ -85,7 +85,7 @@ pub trait Read {
|
||||||
|
|
||||||
/// Constructs a new adapter which will read at most `limit` bytes.
|
/// Constructs a new adapter which will read at most `limit` bytes.
|
||||||
#[inline]
|
#[inline]
|
||||||
fn take(&mut self, limit: u64) -> Take<Self> { Take { reader: self, remaining: limit } }
|
fn take(&mut self, limit: u64) -> Take<'_, Self> { Take { reader: self, remaining: limit } }
|
||||||
|
|
||||||
/// Attempts to read up to limit bytes from the reader, allocating space in `buf` as needed.
|
/// Attempts to read up to limit bytes from the reader, allocating space in `buf` as needed.
|
||||||
///
|
///
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
nightly-2025-05-23
|
nightly-2025-06-06
|
||||||
|
|
|
@ -111,7 +111,7 @@ impl Witness {
|
||||||
/// Returns a struct implementing [`Iterator`].
|
/// Returns a struct implementing [`Iterator`].
|
||||||
#[must_use = "iterators are lazy and do nothing unless consumed"]
|
#[must_use = "iterators are lazy and do nothing unless consumed"]
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn iter(&self) -> Iter {
|
pub fn iter(&self) -> Iter<'_> {
|
||||||
Iter { inner: self.content.as_slice(), indices_start: self.indices_start, current_index: 0 }
|
Iter { inner: self.content.as_slice(), indices_start: self.indices_start, current_index: 0 }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue