From 9fda623b02b2a0a9e9cdf806d9945d0759c8bf01 Mon Sep 17 00:00:00 2001 From: Martin Haug Date: Wed, 23 Feb 2022 20:06:48 +0100 Subject: Code Review: That's just like your struct, man. --- src/syntax/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/syntax/mod.rs') diff --git a/src/syntax/mod.rs b/src/syntax/mod.rs index fc98bb34..85f2013c 100644 --- a/src/syntax/mod.rs +++ b/src/syntax/mod.rs @@ -757,7 +757,7 @@ impl NodeKind { /// Whether this node is `at_start` given the previous value of the property. pub fn is_at_start(&self, prev: bool) -> bool { match self { - Self::Space(n) if *n > 0 => true, + Self::Space(1 ..) => true, Self::Space(_) | Self::LineComment | Self::BlockComment => prev, _ => false, } @@ -858,7 +858,7 @@ impl NodeKind { Self::Include => "keyword `include`", Self::From => "keyword `from`", Self::Markup(_) => "markup", - Self::Space(n) if *n > 1 => "paragraph break", + Self::Space(2 ..) => "paragraph break", Self::Space(_) => "space", Self::Linebreak => "forced linebreak", Self::Text(_) | Self::TextInLine(_) => "text", -- cgit v1.2.3