From 37a7afddfaffd44cb9bc013c9506599267e08983 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Thu, 3 Nov 2022 11:44:53 +0100 Subject: Split crates --- src/syntax/incremental.rs | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'src/syntax/incremental.rs') diff --git a/src/syntax/incremental.rs b/src/syntax/incremental.rs index 529defd7..15c0df0c 100644 --- a/src/syntax/incremental.rs +++ b/src/syntax/incremental.rs @@ -235,17 +235,17 @@ fn replace( let (newborns, terminated, amount) = match mode { ReparseMode::Code => reparse_code_block( - &prefix, + prefix, &change.text[newborn_span.start ..], newborn_span.len(), ), ReparseMode::Content => reparse_content_block( - &prefix, + prefix, &change.text[newborn_span.start ..], newborn_span.len(), ), ReparseMode::MarkupElements { at_start, min_indent } => reparse_markup_elements( - &prefix, + prefix, &change.text[newborn_span.start ..], newborn_span.len(), differential, @@ -385,17 +385,17 @@ enum ReparseMode { /// Whether changes _inside_ this node are safely encapsulated, so that only /// this node must be reparsed. fn is_bounded(kind: &NodeKind) -> bool { - match kind { + matches!( + kind, NodeKind::CodeBlock - | NodeKind::ContentBlock - | NodeKind::Linebreak - | NodeKind::SmartQuote { .. } - | NodeKind::BlockComment - | NodeKind::Space { .. } - | NodeKind::Escape(_) - | NodeKind::Shorthand(_) => true, - _ => false, - } + | NodeKind::ContentBlock + | NodeKind::Linebreak + | NodeKind::SmartQuote { .. } + | NodeKind::BlockComment + | NodeKind::Space { .. } + | NodeKind::Escape(_) + | NodeKind::Shorthand(_) + ) } /// Whether `at_start` would still be true after this node given the -- cgit v1.2.3