Fix build warnings #31

Open
opened 2024-03-20 16:05:36 +00:00 by kemitix · 0 comments
Owner
       Fixed src/file/env.rs (1 fix)
warning: `flatten()` will run forever if the iterator repeatedly produces an `Err`
  --> src/file/read.rs:10:32
   |
10 |     for line in reader.lines().flatten() {
   |                                ^^^^^^^^^ 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/file/read.rs:10:17
   |
10 |     for line in reader.lines().flatten() {
   |                 ^^^^^^^^^^^^^^
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#lines_filter_map_ok
   = note: `-D clippy::lines-filter-map-ok` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::lines_filter_map_ok)]`

warning: `podal` (lib) generated 1 warning
warning: `podal` (lib test) generated 1 warning (1 duplicate)
``` Fixed src/file/env.rs (1 fix) warning: `flatten()` will run forever if the iterator repeatedly produces an `Err` --> src/file/read.rs:10:32 | 10 | for line in reader.lines().flatten() { | ^^^^^^^^^ 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/file/read.rs:10:17 | 10 | for line in reader.lines().flatten() { | ^^^^^^^^^^^^^^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#lines_filter_map_ok = note: `-D clippy::lines-filter-map-ok` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(clippy::lines_filter_map_ok)]` warning: `podal` (lib) generated 1 warning warning: `podal` (lib test) generated 1 warning (1 duplicate) ```
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: kemitix/podal#31
No description provided.