aboutsummaryrefslogtreecommitdiffstats
path: root/src/subtokenize.rs
diff options
context:
space:
mode:
authorLibravatar Hocdoc <bernhardberger@gmx.at>2022-11-10 10:06:43 +0100
committerLibravatar GitHub <noreply@github.com>2022-11-10 10:06:43 +0100
commit34ea2841df53a1aafafb01c887965469344552ba (patch)
treec21d303bd0ac12bc0b81ba41556694139c5b55a6 /src/subtokenize.rs
parent48823f080218d5a13dbde2ed152b8144de5afef8 (diff)
downloadmarkdown-rs-34ea2841df53a1aafafb01c887965469344552ba.tar.gz
markdown-rs-34ea2841df53a1aafafb01c887965469344552ba.tar.bz2
markdown-rs-34ea2841df53a1aafafb01c887965469344552ba.zip
Refactor code-style for Rust 1.65
Closes GH-29. Reviewed-by: Titus Wormer <tituswormer@gmail.com> Co-authored-by: Bernhard Berger <bernhardberger3456@gmail.com>
Diffstat (limited to 'src/subtokenize.rs')
-rw-r--r--src/subtokenize.rs4
1 files changed, 2 insertions, 2 deletions
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());
}