Skip to content

Commit

Permalink
refactor: cleaner implementation using find
Browse files Browse the repository at this point in the history
  • Loading branch information
noamteyssier committed Apr 10, 2024
1 parent 0888df7 commit 76d0aae
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions tests/bcf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ mod testing {
fn get_num_cols(output: &[u8]) -> usize {
output
.split(|&c| c == b'\n')
.skip_while(|line| line.starts_with(b"#"))
.next()
.find(|line| !line.starts_with(b"#"))
.unwrap()
.split(|&c| c == b'\t')
.count()
Expand Down

0 comments on commit 76d0aae

Please sign in to comment.