We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
checked_mul()
1 parent 7d0c3e4 commit 8e2816dCopy full SHA for 8e2816d
src/items/relative.rs
@@ -110,7 +110,7 @@ fn displacement(input: &mut &str) -> ModalResult<Relative> {
110
Some(match unit.strip_suffix('s').unwrap_or(unit) {
111
"year" => Relative::Years(multipler),
112
"month" => Relative::Months(multipler),
113
- "fortnight" => Relative::Days(14 * multipler),
+ "fortnight" => Relative::Days(multipler.checked_mul(14)?),
114
"week" => Relative::Days(7 * multipler),
115
"day" => Relative::Days(multipler),
116
"hour" => Relative::Hours(multipler),
0 commit comments