chore: cargo fmt

This commit is contained in:
Henry Schimke
2024-01-31 19:09:50 -06:00
parent 175511180f
commit 13c5bb5916
6 changed files with 15 additions and 26 deletions

View File

@@ -172,12 +172,7 @@ pub trait GridSampler {
} }
// dbg!(bits.to_string()); // dbg!(bits.to_string());
Ok(( Ok((bits, [Point::default(); 4]))
bits,
[
Point::default();4
],
))
} }
/** /**

View File

@@ -93,9 +93,7 @@ impl StringUtils {
// First try UTF-16, assuming anything with its BOM is UTF-16 // First try UTF-16, assuming anything with its BOM is UTF-16
if bytes.len() > 2 if bytes.len() > 2 && ((bytes[0..=1] == [0xFE, 0xFF]) || (bytes[0..=1] == [0xFF, 0xFE])) {
&& ((bytes[0..=1] == [0xFE,0xFF]) || (bytes[0..=1] == [0xFF , 0xFE]))
{
if bytes[0..=1] == [0xFE, 0xFF] { if bytes[0..=1] == [0xFE, 0xFF] {
return Some(CharacterSet::UTF16BE); return Some(CharacterSet::UTF16BE);
} else { } else {

View File

@@ -71,12 +71,8 @@ impl OneDReader for TelepenReader {
// largest gaps. // largest gaps.
while j <= end { while j <= end {
let currentCounter = theCounters[j]; let currentCounter = theCounters[j];
if currentCounter < minBar { minBar = u32::min(currentCounter, minBar);
minBar = currentCounter; maxBar = u32::max(currentCounter, maxBar);
}
if currentCounter > maxBar {
maxBar = currentCounter;
}
j += 1; j += 1;
} }