remove ResultPoint trait uses of Point

Point already has `x` and `y` properties, so accessing
them with `getX()` and `getY()` is needlessly verbose.
These calls have been removed, though the trait impl is
still presen for the time being, since the OneDReader
proc macro requires it.
This commit is contained in:
Vukašin Stepanović
2023-02-16 15:54:07 +00:00
parent 9889555b02
commit 0992e85e6c
16 changed files with 137 additions and 147 deletions

View File

@@ -19,7 +19,7 @@ use std::collections::HashMap;
use crate::{
common::Result, multi::MultipleBarcodeReader, BarcodeFormat, BinaryBitmap,
DecodingHintDictionary, Exceptions, Point, RXingResult, RXingResultMetadataType,
RXingResultMetadataValue, Reader, ResultPoint,
RXingResultMetadataValue, Reader,
};
use super::{
@@ -153,7 +153,7 @@ impl PDF417Reader {
fn getMaxWidth(p1: &Option<Point>, p2: &Option<Point>) -> u64 {
if let (Some(p1), Some(p2)) = (p1, p2) {
(p1.getX() - p2.getX()).abs() as u64
(p1.x - p2.x).abs() as u64
} else {
0
}
@@ -161,7 +161,7 @@ impl PDF417Reader {
fn getMinWidth(p1: &Option<Point>, p2: &Option<Point>) -> u64 {
if let (Some(p1), Some(p2)) = (p1, p2) {
(p1.getX() - p2.getX()).abs() as u64
(p1.x - p2.x).abs() as u64
} else {
u32::MAX as u64
}