mirror of
https://github.com/starovoid/rxing.git
synced 2026-07-28 05:12:34 +00:00
use iter and sum
This commit is contained in:
@@ -73,11 +73,13 @@ impl OneDReader for Code93Reader {
|
|||||||
self.decodeRowRXingResult
|
self.decodeRowRXingResult
|
||||||
.truncate(self.decodeRowRXingResult.chars().count() - 1); // remove asterisk
|
.truncate(self.decodeRowRXingResult.chars().count() - 1); // remove asterisk
|
||||||
|
|
||||||
let mut lastPatternSize = 0;
|
// let mut lastPatternSize = 0;
|
||||||
for counter in theCounters {
|
// for counter in theCounters {
|
||||||
// for (int counter : theCounters) {
|
// // for (int counter : theCounters) {
|
||||||
lastPatternSize += counter;
|
// lastPatternSize += counter;
|
||||||
}
|
// }
|
||||||
|
|
||||||
|
let lastPatternSize : u32 = theCounters.iter().sum();
|
||||||
|
|
||||||
// Should be at least one more black module
|
// Should be at least one more black module
|
||||||
if nextStart == end || !row.get(nextStart) {
|
if nextStart == end || !row.get(nextStart) {
|
||||||
|
|||||||
Reference in New Issue
Block a user