From fd860a975b84da9a79abfa247787e6adbd5ea34c Mon Sep 17 00:00:00 2001 From: Titus Wormer Date: Tue, 5 Jul 2022 13:03:09 +0200 Subject: Refactor code style --- src/content/flow.rs | 4 ++-- src/content/mod.rs | 1 - src/content/text.rs | 8 ++++---- 3 files changed, 6 insertions(+), 7 deletions(-) (limited to 'src/content') diff --git a/src/content/flow.rs b/src/content/flow.rs index 3ff948d..74c6a62 100644 --- a/src/content/flow.rs +++ b/src/content/flow.rs @@ -140,7 +140,7 @@ fn blank_line_after(tokenizer: &mut Tokenizer, code: Code) -> StateFnResult { tokenizer.interrupt = false; (State::Fn(Box::new(start)), None) } - _ => unreachable!("expected eol/eof after blank line `{:?}`", code), + _ => unreachable!("expected eol/eof"), } } @@ -162,7 +162,7 @@ fn after(tokenizer: &mut Tokenizer, code: Code) -> StateFnResult { tokenizer.exit(TokenType::LineEnding); (State::Fn(Box::new(start)), None) } - _ => unreachable!("unexpected non-eol/eof after flow `{:?}`", code), + _ => unreachable!("expected eol/eof"), } } diff --git a/src/content/mod.rs b/src/content/mod.rs index 395e41b..ae8ad83 100644 --- a/src/content/mod.rs +++ b/src/content/mod.rs @@ -1,6 +1,5 @@ //! Content types found in markdown. -#[allow(clippy::module_inception)] pub mod flow; pub mod string; pub mod text; diff --git a/src/content/text.rs b/src/content/text.rs index ecb6ae1..cf630f1 100644 --- a/src/content/text.rs +++ b/src/content/text.rs @@ -8,15 +8,15 @@ //! //! * [Attention][crate::construct::attention] //! * [Autolink][crate::construct::autolink] -//! * [HTML (text)][crate::construct::html_text] +//! * [Character escape][crate::construct::character_escape] +//! * [Character reference][crate::construct::character_reference] +//! * [Code (text)][crate::construct::code_text] //! * [Hard break (escape)][crate::construct::hard_break_escape] //! * [Hard break (trailing)][crate::construct::hard_break_trailing] -//! * [Code (text)][crate::construct::code_text] +//! * [HTML (text)][crate::construct::html_text] //! * [Label start (image)][crate::construct::label_start_image] //! * [Label start (link)][crate::construct::label_start_link] //! * [Label end][crate::construct::label_end] -//! * [Character escape][crate::construct::character_escape] -//! * [Character reference][crate::construct::character_reference] use crate::construct::{ attention::start as attention, autolink::start as autolink, -- cgit