Skip to content

Commit

Permalink
utils: fix type inference regression in rust 1.22
Browse files Browse the repository at this point in the history
  • Loading branch information
pietroalbini committed Oct 27, 2017
1 parent 7b0c39c commit 4b3cdc4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/utils/parse_time.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ pub fn parse_time(input: &str) -> Result<usize> {
'0' ... '9' => number_len += 1,
_ => {
if number_len > 0 {
number_temp = input[i-number_len..i].parse()?;
number_temp = input[i-number_len..i].parse::<usize>()?;

match c {
's' => {},
Expand All @@ -54,7 +54,7 @@ pub fn parse_time(input: &str) -> Result<usize> {
}

if number_len > 0 {
result += input[input.len() - number_len..].parse()?;
result += input[input.len() - number_len..].parse::<usize>()?;
}

Ok(result)
Expand Down

0 comments on commit 4b3cdc4

Please sign in to comment.