mirror of
https://git.proxmox.com/git/proxmox
synced 2025-12-21 16:13:57 +00:00
Prevents the following error:
```
error[E0597]: `inner` does not live long enough
--> proxmox-async/src/broadcast_future.rs:109:24
|
107 | inner: Arc<Mutex<BroadCastFutureBinding<T>>>,
| ----- binding `inner` declared here
108 | ) -> impl Future<Output = Result<T, Error>> {
109 | let mut data = inner.lock().unwrap();
| ^^^^^ borrowed value does not live long enough
...
121 | data.broadcast.listen()
| ----------------------- argument requires that `inner` is borrowed for `'static`
122 | }
| - `inner` dropped here while still borrowed
error[E0597]: `data` does not live long enough
--> proxmox-async/src/broadcast_future.rs:121:9
|
109 | let mut data = inner.lock().unwrap();
| -------- binding `data` declared here
...
121 | data.broadcast.listen()
| ^^^^-------------------
| |
| borrowed value does not live long enough
| argument requires that `data` is borrowed for `'static`
122 | }
| - `data` dropped here while still borrowed
```
The use<...> pattern was introduced in rust 1.82.
Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
|
||
|---|---|---|
| .. | ||
| debian | ||
| src | ||
| Cargo.toml | ||