Skip to contentSkip to conversation

`Option::filter` in nova-core/firmware.rs

DISCUSSION Alice Ryhl 2 participants 2 messages Apr 27

Subsystems (3)
lore
Share & tools
lore

Alice Ryhl

author reviewer
#0 lore raw

Hi Nova folks,

I'm seeing this clippy warning with latest nightly rust:

error: manual implementation of Option::filter
--> drivers/gpu/nova-core/firmware.rs:391:14

    |
391 |               .and_then(|hdr| {
    |  ______________^
392 | |                 if hdr.bin_magic == BIN_MAGIC {
393 | |                     Some(hdr)
394 | |                 } else {
...   |
397 | |             })
    | |______________^ help: try: `filter(|hdr| hdr.bin_magic == BIN_MAGIC)`

|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_filter
= note: -D clippy::manual-filter implied by -D warnings
= help: to override -D warnings add #[allow(clippy::manual_filter)]

Alice