summaryrefslogtreecommitdiff
path: root/src/parse/lines.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/parse/lines.rs')
-rw-r--r--src/parse/lines.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/parse/lines.rs b/src/parse/lines.rs
index d1a6c781..c47b7534 100644
--- a/src/parse/lines.rs
+++ b/src/parse/lines.rs
@@ -70,13 +70,13 @@ impl<'s> LineMap<'s> {
/// Whether this character denotes a newline.
pub fn is_newline(character: char) -> bool {
- match character {
+ matches!(
+ character,
// Line Feed, Vertical Tab, Form Feed, Carriage Return.
'\n' | '\x0B' | '\x0C' | '\r' |
// Next Line, Line Separator, Paragraph Separator.
- '\u{0085}' | '\u{2028}' | '\u{2029}' => true,
- _ => false,
- }
+ '\u{0085}' | '\u{2028}' | '\u{2029}'
+ )
}
#[cfg(test)]