Fix warning "hiding a lifetime that's elided elsewhere"

Before:
   Compiling nih_plug v0.0.0
warning: hiding a lifetime that's elided elsewhere is confusing
   --> src\params\smoothing.rs:248:17
    |
248 |     pub fn iter(&self) -> SmootherIter<T> {
    |                 ^^^^^     --------------- the same lifetime is hidden here
    |                 |
    |                 the lifetime is elided here
    |
    = help: the same lifetime is referred to in inconsistent ways, making the signature confusing
    = note: `#[warn(mismatched_lifetime_syntaxes)]` on by default
help: use `'_` for type paths
    |
248 |     pub fn iter(&self) -> SmootherIter<'_, T> {
    |                                        +++

warning: `nih_plug` (lib) generated 1 warning
    Finished `release` profile [optimized] target(s) in 2.27s

After:
   Compiling nih_plug v0.0.0
    Finished `release` profile [optimized] target(s) in 2.27s
This commit is contained in:
andrewprograms
2025-09-06 13:14:16 -07:00
parent 376d8d4954
commit 206834cbaf

View File

@@ -245,7 +245,7 @@ impl<T: Smoothable> Smoother<T> {
/// sole reason that this will always yield a value, and needing to unwrap all of those options
/// is not going to be very fun.
#[inline]
pub fn iter(&self) -> SmootherIter<T> {
pub fn iter(&self) -> SmootherIter<'_, T> {
SmootherIter { smoother: self }
}