[librsvg/rustification] path_parser.rs: Simplify optional_comma_whitespace()
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg/rustification] path_parser.rs: Simplify optional_comma_whitespace()
- Date: Tue, 8 Nov 2016 22:05:12 +0000 (UTC)
commit 1490d99061422ce66fee7dd20204570c18a60d5e
Author: Federico Mena Quintero <federico gnome org>
Date: Mon Nov 7 14:22:13 2016 -0600
path_parser.rs: Simplify optional_comma_whitespace()
rust/src/path_parser.rs | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)
---
diff --git a/rust/src/path_parser.rs b/rust/src/path_parser.rs
index 1207795..81ee1ad 100644
--- a/rust/src/path_parser.rs
+++ b/rust/src/path_parser.rs
@@ -128,11 +128,9 @@ impl<'external> PathParser<'external> {
fn optional_comma_whitespace (&mut self) -> bool {
assert! (self.optional_whitespace ());
- if self.match_char (',') {
- self.optional_whitespace ()
- } else {
- true
- }
+ self.match_char (',');
+ assert! (self.optional_whitespace ());
+ true
}
fn lookahead_is (&self, c: char) -> bool {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]