Skip to content

Commit 67b70e4

Browse files
committed
ci: fix new lifetime lint
This lint appears when running the stable compiler, not just clippy. We don't pin the stable compiler version, so this has started showing up in CI, which is a bit noisy.
1 parent 255b9d9 commit 67b70e4

File tree

7 files changed

+8
-8
lines changed

7 files changed

+8
-8
lines changed

src/descriptor/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ impl<Pk: MiniscriptKey> Descriptor<Pk> {
294294
///
295295
/// If the descriptor is not a Taproot descriptor, **or** if the descriptor is a
296296
/// Taproot descriptor containing only a keyspend, returns an empty iterator.
297-
pub fn tap_tree_iter(&self) -> tr::TapTreeIter<Pk> {
297+
pub fn tap_tree_iter(&self) -> tr::TapTreeIter<'_, Pk> {
298298
if let Descriptor::Tr(ref tr) = self {
299299
if let Some(tree) = tr.tap_tree() {
300300
return tree.leaves();

src/descriptor/tr/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ impl<Pk: MiniscriptKey> Tr<Pk> {
108108
///
109109
/// The yielded elements include the Miniscript for each leave as well as its depth
110110
/// in the tree, which is the data required by PSBT (BIP 371).
111-
pub fn leaves(&self) -> TapTreeIter<Pk> {
111+
pub fn leaves(&self) -> TapTreeIter<'_, Pk> {
112112
match self.tree {
113113
Some(ref t) => t.leaves(),
114114
None => TapTreeIter::empty(),

src/descriptor/tr/spend_info.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ impl<Pk: ToPublicKey> TrSpendInfo<Pk> {
181181
/// This yields the same leaves in the same order as [`super::Tr::leaves`] on the original
182182
/// [`super::Tr`]. However, in addition to yielding the leaves and their depths, it also
183183
/// yields their scripts, leafhashes, and control blocks.
184-
pub fn leaves(&self) -> TrSpendInfoIter<Pk> {
184+
pub fn leaves(&self) -> TrSpendInfoIter<'_, Pk> {
185185
TrSpendInfoIter {
186186
spend_info: self,
187187
index: 0,

src/descriptor/tr/taptree.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ impl<Pk: MiniscriptKey> TapTree<Pk> {
5353
///
5454
/// The yielded elements include the Miniscript for each leave as well as its depth
5555
/// in the tree, which is the data required by PSBT (BIP 371).
56-
pub fn leaves(&self) -> TapTreeIter<Pk> { TapTreeIter::from_tree(self) }
56+
pub fn leaves(&self) -> TapTreeIter<'_, Pk> { TapTreeIter::from_tree(self) }
5757

5858
/// Converts keys from one type of public key to another.
5959
pub fn translate_pk<T>(

src/miniscript/iter.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ impl<Pk: MiniscriptKey, Ctx: ScriptContext> Miniscript<Pk, Ctx> {
1818
/// Creates a new [Iter] iterator that will iterate over all [Miniscript] items within
1919
/// AST by traversing its branches. For the specific algorithm please see
2020
/// [Iter::next] function.
21-
pub fn iter(&self) -> Iter<Pk, Ctx> { Iter::new(self) }
21+
pub fn iter(&self) -> Iter<'_, Pk, Ctx> { Iter::new(self) }
2222

2323
/// Creates a new [PkIter] iterator that will iterate over all plain public keys (and not
2424
/// key hash values) present in [Miniscript] items within AST by traversing all its branches.
2525
/// For the specific algorithm please see [PkIter::next] function.
26-
pub fn iter_pk(&self) -> PkIter<Pk, Ctx> { PkIter::new(self) }
26+
pub fn iter_pk(&self) -> PkIter<'_, Pk, Ctx> { PkIter::new(self) }
2727

2828
/// Enumerates all child nodes of the current AST node (`self`) and returns a `Vec` referencing
2929
/// them.

src/policy/concrete.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ impl<Pk: MiniscriptKey> Policy<Pk> {
192192
/// Since this splitting might lead to exponential blow-up, we constrain the number of
193193
/// leaf-nodes to [`MAX_COMPILATION_LEAVES`].
194194
#[cfg(feature = "compiler")]
195-
fn tapleaf_probability_iter(&self) -> TapleafProbabilityIter<Pk> {
195+
fn tapleaf_probability_iter(&self) -> TapleafProbabilityIter<'_, Pk> {
196196
TapleafProbabilityIter { stack: vec![(1.0, self)] }
197197
}
198198

src/primitives/threshold.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ impl<T, const MAX: usize> Threshold<T, MAX> {
217217
pub fn into_data(self) -> Vec<T> { self.inner }
218218

219219
/// Passthrough to an iterator on the underlying vector.
220-
pub fn iter(&self) -> core::slice::Iter<T> { self.inner.iter() }
220+
pub fn iter(&self) -> core::slice::Iter<'_, T> { self.inner.iter() }
221221
}
222222

223223
impl<T> Threshold<T, 0> {

0 commit comments

Comments
 (0)