5
0
mirror of git://git.proxmox.com/git/proxmox-backup.git synced 2025-01-05 09:17:59 +03:00
proxmox-backup/proxmox-restore-daemon
Maximiliano Sandoval acddd3f09a restore_daemon: use map_while instead of filter_map(Result::ok)
Fixes the lines_filter_map_ok clippy lint:

```
warning: `filter_map()` will run forever if the iterator repeatedly produces an `Err`
   --> proxmox-restore-daemon/src/proxmox_restore_daemon/disk.rs:195:14
    |
195 |             .filter_map(Result::ok)
    |              ^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `map_while(Result::ok)`
    |
note: this expression returning a `std::io::Lines` may produce an infinite number of `Err` in case of a read error
   --> proxmox-restore-daemon/src/proxmox_restore_daemon/disk.rs:193:18
    |
193 |           for f in BufReader::new(File::open("/proc/filesystems")?)
    |  __________________^
194 | |             .lines()
    | |____________________^
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#lines_filter_map_ok
    = note: `#[warn(clippy::lines_filter_map_ok)]` on by default
```

Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
2024-12-02 11:15:18 +01:00
..
src restore_daemon: use map_while instead of filter_map(Result::ok) 2024-12-02 11:15:18 +01:00
Cargo.toml restore-daemon: remove unused dependencies 2024-08-14 12:13:50 +02:00