From 34ea2841df53a1aafafb01c887965469344552ba Mon Sep 17 00:00:00 2001 From: Hocdoc Date: Thu, 10 Nov 2022 10:06:43 +0100 Subject: Refactor code-style for Rust 1.65 Closes GH-29. Reviewed-by: Titus Wormer Co-authored-by: Bernhard Berger --- src/subtokenize.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/subtokenize.rs') diff --git a/src/subtokenize.rs b/src/subtokenize.rs index 9c049b2..348224f 100644 --- a/src/subtokenize.rs +++ b/src/subtokenize.rs @@ -96,7 +96,7 @@ pub fn subtokenize( debug_assert_eq!(event.kind, Kind::Enter); // No need to enter linked events again. - if link.previous == None + if link.previous.is_none() && (filter.is_none() || &link.content == filter.as_ref().unwrap()) { // Index into `events` pointing to a chunk. @@ -148,7 +148,7 @@ pub fn subtokenize( let link_curr = enter.link.as_ref().expect("expected link"); debug_assert_eq!(enter.kind, Kind::Enter); - if link_curr.previous != None { + if link_curr.previous.is_some() { tokenizer.define_skip(enter.point.clone()); } -- cgit