mirror of
https://github.com/starovoid/rxing.git
synced 2026-07-26 04:12:34 +00:00
clippy --fix suggestions
This commit is contained in:
@@ -22,10 +22,10 @@ impl Version {
|
|||||||
//throw std::invalid_argument("Unexpected dimension");
|
//throw std::invalid_argument("Unexpected dimension");
|
||||||
return Err(Exceptions::ILLEGAL_ARGUMENT);
|
return Err(Exceptions::ILLEGAL_ARGUMENT);
|
||||||
}
|
}
|
||||||
return Self::FromNumber(
|
Self::FromNumber(
|
||||||
(dimension - Self::DimensionOffset(isMicro)) / Self::DimensionStep(isMicro),
|
(dimension - Self::DimensionOffset(isMicro)) / Self::DimensionStep(isMicro),
|
||||||
isMicro,
|
isMicro,
|
||||||
);
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn FromNumber(versionNumber: u32, is_micro: bool) -> Result<VersionRef> {
|
pub fn FromNumber(versionNumber: u32, is_micro: bool) -> Result<VersionRef> {
|
||||||
|
|||||||
@@ -594,7 +594,7 @@ pub fn determineConsecutiveDigitCount(msg: &str, startpos: u32) -> u32 {
|
|||||||
let len = msg.chars().count(); //len();
|
let len = msg.chars().count(); //len();
|
||||||
let mut idx = startpos;
|
let mut idx = startpos;
|
||||||
// let graphemes = msg.graphemes(true);
|
// let graphemes = msg.graphemes(true);
|
||||||
while (idx as usize) < len && isDigit(msg.chars().nth(idx as usize).unwrap_or(char::default()))
|
while (idx as usize) < len && isDigit(msg.chars().nth(idx as usize).unwrap_or_default())
|
||||||
{
|
{
|
||||||
idx += 1;
|
idx += 1;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,8 +24,8 @@
|
|||||||
* http://www.piramidepse.com/
|
* http://www.piramidepse.com/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
use crate::common::Result;
|
|
||||||
use crate::{oned::rss::expanded::ExpandedPair, Reader};
|
use crate::{Reader};
|
||||||
|
|
||||||
use super::{test_case_util, RSSExpandedReader};
|
use super::{test_case_util, RSSExpandedReader};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user