[librsvg: 40/43] path_parser: simplify if clause



commit 11baafc94f5f32f02f4c5c978385e35b26879e17
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]