error[E0309]: the parameter type `V` may not live long enough
--> /home/$USER/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xot-0.22.0/src/nodemap/core.rs:100:9
|
37 | impl<'a, K, V, A: ValueAdapter<K, V>> NodeMap<'a, K, V, A>
| -- the parameter type `V` must be valid for the lifetime `'a` as defined here...
...
100 | / self.iter_value()
101 | | .map(|value| (A::key(value), A::value(value)))
| |__________________________________________________________^ ...so that the type `V` will meet its required lifetime bounds
|
help: consider adding an explicit lifetime bound
|
40 | V: Clone + 'a,
| ++++
error[E0309]: the parameter type `V` may not live long enough
--> /home/$USER/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xot-0.22.0/src/nodemap/core.rs:116:9
|
37 | impl<'a, K, V, A: ValueAdapter<K, V>> NodeMap<'a, K, V, A>
| -- the parameter type `V` must be valid for the lifetime `'a` as defined here...
...
116 | self.iter_value().map(move |value| A::value(value))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...so that the type `V` will meet its required lifetime bounds
|
help: consider adding an explicit lifetime bound
|
40 | V: Clone + 'a,
| ++++
For more information about this error, try `rustc --explain E0309`.
error: could not compile `xot` (lib) due to 2 previous errors
xot/src/nodemap/core.rs
Lines 99 to 102 in 6fbd052
xot/src/nodemap/core.rs
Lines 115 to 117 in 6fbd052