1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-08-04 15:07:47 +00:00

refactor/polish ~ fix cargo clippy complaints (use is_ok)

This commit is contained in:
Roy Ivy III 2019-12-26 15:18:22 -06:00
parent 8b18b7c206
commit 739c2d5793

View file

@ -58,10 +58,7 @@ impl Token {
}
fn is_a_number(&self) -> bool {
match *self {
Token::Value { ref value, .. } => match value.parse::<i64>() {
Ok(_) => true,
Err(_) => false,
},
Token::Value { ref value, .. } => value.parse::<i64>().is_ok(),
_ => false,
}
}