many small rustifications

This commit is contained in:
Henry Schimke
2023-01-10 14:33:47 -06:00
parent 752d8c87b9
commit 9f7a41f81c
23 changed files with 218 additions and 187 deletions

View File

@@ -29,7 +29,7 @@ use super::DatamatrixDetectorResult;
*/
pub struct Detector<'a> {
image: &'a BitMatrix,
rectangleDetector: WhiteRectangleDetector,
rectangleDetector: WhiteRectangleDetector<'a>,
}
impl<'a> Detector<'_> {
pub fn new(image: &'a BitMatrix) -> Result<Detector<'a>, Exceptions> {
@@ -127,7 +127,7 @@ impl<'a> Detector<'_> {
/**
* Detect a solid side which has minimum transition.
*/
fn detectSolid1(&self, cornerPoints: Vec<RXingResultPoint>) -> [RXingResultPoint; 4] {
fn detectSolid1(&self, cornerPoints: [RXingResultPoint; 4]) -> [RXingResultPoint; 4] {
// 0 2
// 1 3
let pointA = cornerPoints[0];