mirror of
https://github.com/robbert-vdh/nih-plug.git
synced 2026-07-01 02:36:54 +00:00
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:
@@ -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 }
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user