mirror of
https://github.com/starovoid/rxing.git
synced 2026-07-26 04:12:34 +00:00
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:
@@ -17,7 +17,7 @@
|
||||
use crate::{
|
||||
common::{BitArray, Result},
|
||||
point, BinaryBitmap, DecodeHintType, DecodeHintValue, DecodingHintDictionary, Exceptions,
|
||||
RXingResult, RXingResultMetadataType, RXingResultMetadataValue, Reader, ResultPoint,
|
||||
RXingResult, RXingResultMetadataType, RXingResultMetadataValue, Reader,
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -117,8 +117,8 @@ pub trait OneDReader: Reader {
|
||||
// And remember to flip the result points horizontally.
|
||||
let points = result.getPointsMut();
|
||||
if !points.is_empty() && points.len() >= 2 {
|
||||
points[0] = point(width as f32 - points[0].getX() - 1.0, points[0].getY());
|
||||
points[1] = point(width as f32 - points[1].getX() - 1.0, points[1].getY());
|
||||
points[0] = point(width as f32 - points[0].x - 1.0, points[0].y);
|
||||
points[1] = point(width as f32 - points[1].x - 1.0, points[1].y);
|
||||
}
|
||||
}
|
||||
return Ok(result);
|
||||
|
||||
Reference in New Issue
Block a user