Commit b7a1252
committed
libazureinit: fix clippy warning for Rust 1.84
Starting from Rust 1.84, clippy gives warning like below:
```
warning: this `map_or` is redundant
--> libazureinit/src/config.rs:345:21
|
345 | path.extension().map_or(false, |ext| ext == "toml")
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use is_some_and instead: `path.extension().is_some_and(|ext| ext == "toml")`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or
= note: `#[warn(clippy::unnecessary_map_or)]` on by default
```
Fix that by using `is_some_and`.
See also
https://github.com/rust-lang/rust-clippy/blob/master/CHANGELOG.md#rust-184,
rust-lang/rust-clippy#11796.1 parent 388c312 commit b7a1252
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
342 | 342 | | |
343 | 343 | | |
344 | 344 | | |
345 | | - | |
| 345 | + | |
346 | 346 | | |
347 | 347 | | |
348 | 348 | | |
| |||
0 commit comments