mirror of
https://github.com/starovoid/rxing.git
synced 2026-07-28 05:12:34 +00:00
chore: cargo fmt
This commit is contained in:
@@ -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
|
|
||||||
],
|
|
||||||
))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -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 {
|
||||||
|
|||||||
@@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user