Skip to content

Commit

Permalink
chore: replace manual implementation of char methods (#4864)
Browse files Browse the repository at this point in the history
  • Loading branch information
hnidoaht-101 authored Oct 28, 2022
1 parent a44c298 commit 09eda1b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion base_layer/core/src/consensus/emission.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ impl EmissionSchedule {
if !n.starts_with("0.") {
return None;
}
if !n.chars().skip(2).all(|i| ('0'..='9').contains(&i)) {
if !n.chars().skip(2).all(|i| i.is_ascii_digit()) {
return None;
}
let arr = n.chars().skip(2).map(|i| i as u8 - 48).collect::<Vec<u8>>();
Expand Down

0 comments on commit 09eda1b

Please sign in to comment.