[librsvg/librsvg-2.46] path_parser: simplify if clause



commit 4068082524293ada87913040f4f18a96ba6c313d
Author: Paolo Borelli <pborelli gnome org>
Date:   Sun Oct 13 12:53:09 2019 +0200

    path_parser: simplify if clause

 rsvg_internals/src/path_parser.rs | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/rsvg_internals/src/path_parser.rs b/rsvg_internals/src/path_parser.rs
index bdf26961..21665c30 100644
--- a/rsvg_internals/src/path_parser.rs
+++ b/rsvg_internals/src/path_parser.rs
@@ -218,10 +218,8 @@ impl<'b> PathParser<'b> {
 
                 let mut c: char = ' ';
 
-                if !has_integer_part {
-                    if !self.lookahead_is_digit(&mut c) {
-                        return Err(self.error(ErrorKind::UnexpectedToken));
-                    }
+                if !has_integer_part && !self.lookahead_is_digit(&mut c) {
+                    return Err(self.error(ErrorKind::UnexpectedToken));
                 }
 
                 while self.lookahead_is_digit(&mut c) {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]