From b8620121a692df6313eeb5ccf7baf89c1e364116 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Sun, 15 Dec 2019 15:43:22 +0100 Subject: =?UTF-8?q?Fix=20nasty=20string=20boundary=20bug=20=F0=9F=8F=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/syntax/parsing.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/syntax') 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::() { + if let Ok(percent) = text[.. text.len()-1].parse::() { break Expression::Num(percent / 100.0); } } -- cgit v1.2.3