mirror of
https://github.com/starovoid/rxing.git
synced 2026-07-26 04:12:34 +00:00
cleanup failures for existing tests
This commit is contained in:
@@ -117,8 +117,8 @@ impl<'a> PatternView<'_> {
|
||||
}
|
||||
pub fn end(&self) -> Option<PatternType> {
|
||||
if self.start + self.count < self.data.0.len() {
|
||||
Some(self.data.0[self.start + self.count])
|
||||
}else {
|
||||
Some(self.data.0[self.start + self.count])
|
||||
} else {
|
||||
None
|
||||
}
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ pub fn FindFinderPatterns(image: &BitMatrix, tryHarder: bool) -> FinderPatterns
|
||||
while {
|
||||
if let Ok(next) = FindLeftGuard(&next, 0, &PATTERN, 0.5) {
|
||||
next.isValid()
|
||||
}else {
|
||||
} else {
|
||||
false
|
||||
}
|
||||
// let Ok(next) = FindLeftGuard(&next, 0, &PATTERN, 0.5) else {
|
||||
@@ -134,6 +134,11 @@ pub fn GenerateFinderPatternSets(patterns: &mut FinderPatterns) -> FinderPattern
|
||||
let cosLower: f64 = (135.0_f64 / 180.0 * 3.1415).cos();
|
||||
|
||||
let nbPatterns = (patterns).len();
|
||||
|
||||
if nbPatterns < 2 {
|
||||
return FinderPatternSets::default();
|
||||
}
|
||||
|
||||
for i in 0..(nbPatterns - 2) {
|
||||
// for (int i = 0; i < nbPatterns - 2; i++) {
|
||||
for j in (i + 1)..(nbPatterns - 1) {
|
||||
|
||||
Reference in New Issue
Block a user