Hi - I did the clippy warnings PR on rust-bio, figured I'd do the same here.
While fixing clippy warnings I noticed this in src/fastq/filter.rs:44:
HashSet::<String>::from_iter(f.lines().filter_map(Result::ok).collect::<Vec<String>>());
Clippy warns that if the iterator keeps producing Err, this never terminates. It also means lines that fail to read are silently dropped, so the filter runs on a partial ID set.
If silently skipping bad lines is intentional (e.g. to handle malformed input files), a comment explaining that would help - in this case I strongly suggest logging a warning or error somewhere so the issue isn't silent. I left this out of my clippy PR since the fix changes error-handling behavior.
Hi - I did the clippy warnings PR on rust-bio, figured I'd do the same here.
While fixing clippy warnings I noticed this in
src/fastq/filter.rs:44:Clippy warns that if the iterator keeps producing
Err, this never terminates. It also means lines that fail to read are silently dropped, so the filter runs on a partial ID set.If silently skipping bad lines is intentional (e.g. to handle malformed input files), a comment explaining that would help - in this case I strongly suggest logging a warning or error somewhere so the issue isn't silent. I left this out of my clippy PR since the fix changes error-handling behavior.