Skip to content

Commit

Permalink
cargo clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
houseme committed Sep 11, 2024
1 parent 1b0878b commit 39f7ed9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/filter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ impl Filter {
/// Returns an error if the reader cannot be read.
pub fn load<R: io::Read>(&mut self, reader: R) -> io::Result<()> {
let buf_reader = BufReader::new(reader);
for word in buf_reader.lines().flatten() {
for word in buf_reader.lines().map_while(Result::ok) {
self.trie.add_word(word.as_str());
}
Ok(())
Expand Down

0 comments on commit 39f7ed9

Please sign in to comment.