Skip to content

Commit

Permalink
rust fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
jqnatividad committed Dec 20, 2023
1 parent ec09be2 commit 135af99
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/sniffer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -204,9 +204,9 @@ impl Sniffer {
}
None => vec![b'\'', b'"', b'`'],
};
let (quote_chr, (quote_cnt, delim_guess)) = quote_guesses
.iter()
.try_fold((b'"', (0, b'\0')), |acc, &chr| -> Result<(u8, (usize, u8))> {
let (quote_chr, (quote_cnt, delim_guess)) = quote_guesses.iter().try_fold(
(b'"', (0, b'\0')),
|acc, &chr| -> Result<(u8, (usize, u8))> {
let mut sample_reader = take_sample_from_start(reader, self.get_sample_size())?;
if let Some((cnt, delim_chr)) =
quote_count(&mut sample_reader, char::from(chr), self.delimiter)?
Expand All @@ -219,7 +219,8 @@ impl Sniffer {
} else {
Ok(acc)
}
})?;
},
)?;
if quote_cnt == 0 {
self.quote = Some(Quote::None);
} else {
Expand Down

0 comments on commit 135af99

Please sign in to comment.