Skip to content

Commit

Permalink
Ignore clippy::lines_filter_map_ok lint
Browse files Browse the repository at this point in the history
rust-lang/rust-clippy#14127

```
warning: `filter_map()` will run forever if the iterator repeatedly produces an `Err`
  --> src/cargo.rs:95:10
   |
95 |         .filter_map(|line| line.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
  --> src/cargo.rs:93:5
   |
93 | /     reader
94 | |         .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
```
  • Loading branch information
taiki-e committed Feb 1, 2025
1 parent 0191b3d commit ebc9deb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,8 @@
//! [trybuild]: https://github.com/dtolnay/trybuild
//! [`cargo expand`]: https://github.com/dtolnay/cargo-expand
#![allow(clippy::lines_filter_map_ok)] // https://github.com/rust-lang/rust-clippy/issues/14127

#[macro_use]
mod path;

Expand Down

0 comments on commit ebc9deb

Please sign in to comment.