clippy --fix suggestions

This commit is contained in:
Henry Schimke
2023-10-28 11:11:30 -05:00
parent d05240ec68
commit 62e49b376d
3 changed files with 5 additions and 5 deletions

View File

@@ -22,10 +22,10 @@ impl Version {
//throw std::invalid_argument("Unexpected dimension");
return Err(Exceptions::ILLEGAL_ARGUMENT);
}
return Self::FromNumber(
Self::FromNumber(
(dimension - Self::DimensionOffset(isMicro)) / Self::DimensionStep(isMicro),
isMicro,
);
)
}
pub fn FromNumber(versionNumber: u32, is_micro: bool) -> Result<VersionRef> {

View File

@@ -594,7 +594,7 @@ pub fn determineConsecutiveDigitCount(msg: &str, startpos: u32) -> u32 {
let len = msg.chars().count(); //len();
let mut idx = startpos;
// 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;
}

View File

@@ -24,8 +24,8 @@
* http://www.piramidepse.com/
*/
use crate::common::Result;
use crate::{oned::rss::expanded::ExpandedPair, Reader};
use crate::{Reader};
use super::{test_case_util, RSSExpandedReader};