mirror of
https://git.asonix.dog/asonix/pict-rs
synced 2024-12-22 11:21:24 +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;
|
type Err = RetentionValueError;
|
||||||
|
|
||||||
fn from_str(s: &str) -> Result<Self, Self::Err> {
|
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() {
|
if num_str.is_empty() {
|
||||||
return Err(RetentionValueError::NoValue);
|
return Err(RetentionValueError::NoValue);
|
||||||
|
|
Loading…
Reference in a new issue