mirror of
https://git.asonix.dog/asonix/pict-rs
synced 2024-11-20 03:11:14 +00:00
Clippy
This commit is contained in:
parent
3ca9caef35
commit
d0c619bdf7
1 changed files with 4 additions and 1 deletions
|
@ -44,7 +44,10 @@ impl std::str::FromStr for RetentionValue {
|
|||
type Err = RetentionValueError;
|
||||
|
||||
fn from_str(s: &str) -> Result<Self, Self::Err> {
|
||||
let num_str = s.chars().take_while(|c| c.is_digit(10)).collect::<String>();
|
||||
let num_str = s
|
||||
.chars()
|
||||
.take_while(|c| c.is_ascii_digit())
|
||||
.collect::<String>();
|
||||
|
||||
if num_str.is_empty() {
|
||||
return Err(RetentionValueError::NoValue);
|
||||
|
|
Loading…
Reference in a new issue