Merge branch 'main' into pr/point_refactor

This commit is contained in:
Vukašin Stepanović
2023-02-16 16:43:24 +00:00
132 changed files with 1048 additions and 1329 deletions

View File

@@ -125,7 +125,7 @@ pub trait OneDReader: Reader {
}
}
Err(Exceptions::NotFoundException(None))
Err(Exceptions::notFound)
}
/**
@@ -212,7 +212,7 @@ pub fn recordPattern(row: &BitArray, start: usize, counters: &mut [u32]) -> Resu
let end = row.getSize();
if start >= end {
return Err(Exceptions::NotFoundException(None));
return Err(Exceptions::notFound);
}
let mut isWhite = !row.get(start);
@@ -235,7 +235,7 @@ pub fn recordPattern(row: &BitArray, start: usize, counters: &mut [u32]) -> Resu
// If we read fully the last section of pixels and filled up our counters -- or filled
// the last counter but ran off the side of the image, OK. Otherwise, a problem.
if !(counterPosition == numCounters || (counterPosition == numCounters - 1 && i == end)) {
return Err(Exceptions::NotFoundException(None));
return Err(Exceptions::notFound);
}
Ok(())
}
@@ -253,7 +253,7 @@ pub fn recordPatternInReverse(row: &BitArray, start: usize, counters: &mut [u32]
}
}
if numTransitionsLeft >= 0 {
return Err(Exceptions::NotFoundException(None));
return Err(Exceptions::notFound);
}
recordPattern(row, start + 1, counters)?;