return a slice for RXingResultPoints

This commit is contained in:
Henry Schimke
2023-01-11 16:06:35 -06:00
parent fde23934f6
commit 7ddeb49064
7 changed files with 8 additions and 8 deletions

View File

@@ -78,7 +78,7 @@ impl Reader for DataMatrixReader {
} else {
let detectorRXingResult = Detector::new(image.getBlackMatrix())?.detect()?;
decoderRXingResult = DECODER.decode(detectorRXingResult.getBits())?;
points = detectorRXingResult.getPoints().clone();
points = detectorRXingResult.getPoints().to_vec();
}
let mut result = RXingResult::new(
decoderRXingResult.getText(),

View File

@@ -16,7 +16,7 @@ impl DetectorRXingResult for DatamatrixDetectorResult {
&self.0
}
fn getPoints(&self) -> &Vec<RXingResultPoint> {
fn getPoints(&self) -> &[RXingResultPoint] {
&self.1
}
}