Skip to content
Myr

Make compatible with min rust version

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Steve Pentland · committed by David Peter · parent 2f3b472 · Browse files · 1 file+10 added−4 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+10 added−4 removed

  • other:+10 added−4 removed

1 file+10 added−4 removed

modified:src/internal.rs+10 added-4 removed
68 unmodified lines
69 if !SIZE_CAPTURES.is_match(s) {70 return None;71 }7273 let captures = SIZE_CAPTURES.captures(s)?;73 let captures = match SIZE_CAPTURES.captures(s) {74 Some(cap) => cap,75 None => return None,76 };7778 let limit = match captures.get(1).map_or("+", |m| m.as_str()) {79 "+" => SizeLimitType::Min,80 _ => SizeLimitType::Max,81 };8283 let quantity = match captures.get(2) {84 None => return None,80 let quantity = match captures.get(2)?.as_str().parse::<u64>() {81 Ok(val) => val,82 _ => return None,85 Some(v) => match v.as_str().parse::<u64>() {86 Ok(val) => val,87 _ => return None,88 },89 };9091 let multiplier = match &captures.get(3).map_or("k", |m| m.as_str()).to_lowercase()[..] {92 "ki" => KIBI,
387 unmodified lines