diff options
| author | Laurenz <laurmaedje@gmail.com> | 2019-12-15 15:43:22 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2019-12-15 15:43:22 +0100 |
| commit | b8620121a692df6313eeb5ccf7baf89c1e364116 (patch) | |
| tree | 2504699a666558206ccf8652ba88973aa3eaae10 /src/syntax | |
| parent | a87937d0c433480be4e81ae22ab05e3d5f0c3e19 (diff) | |
Fix nasty string boundary bug 🏗
Diffstat (limited to 'src/syntax')
| -rw-r--r-- | src/syntax/parsing.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/syntax/parsing.rs b/src/syntax/parsing.rs index 41a8728b..dcba1d0f 100644 --- a/src/syntax/parsing.rs +++ b/src/syntax/parsing.rs @@ -253,7 +253,7 @@ impl<'s> Parser<'s> { // This loop does not actually loop, but is used for breaking. loop { if text.ends_with('%') { - if let Ok(percent) = text[..text.len() - 1].parse::<f64>() { + if let Ok(percent) = text[.. text.len()-1].parse::<f64>() { break Expression::Num(percent / 100.0); } } |
