diff --git a/src/configuration.rs b/src/configuration.rs index 811e556..083f8db 100644 --- a/src/configuration.rs +++ b/src/configuration.rs @@ -553,6 +553,8 @@ pub struct CompileOptions { /// ``` pub allow_dangerous_protocol: bool, + // To do: `doc_markdown` is broken. + #[allow(clippy::doc_markdown)] /// Default line ending to use when compiling to HTML, for line endings not /// in `value`. /// diff --git a/src/event.rs b/src/event.rs index dacb2c0..3e8d513 100644 --- a/src/event.rs +++ b/src/event.rs @@ -3266,7 +3266,7 @@ pub enum Name { /// ^ /// ``` ResourceTitleString, - /// SpaceOrTab. + /// Space or tab. /// /// ## Info /// diff --git a/src/mdast.rs b/src/mdast.rs index 4e3828b..1a9e0ee 100644 --- a/src/mdast.rs +++ b/src/mdast.rs @@ -224,6 +224,8 @@ fn children_to_string(children: &[Node]) -> String { children.iter().map(ToString::to_string).collect() } +// To do: clippy may be right but that’s a breaking change. +#[allow(clippy::to_string_trait_impl)] impl ToString for Node { fn to_string(&self) -> String { match self { diff --git a/src/to_mdast.rs b/src/to_mdast.rs index 7f29756..acea219 100644 --- a/src/to_mdast.rs +++ b/src/to_mdast.rs @@ -1280,7 +1280,7 @@ fn on_exit_label_text(context: &mut CompileContext) { .media_reference_stack .last_mut() .expect("expected reference on media stack"); - reference.label = label.clone(); + reference.label.clone_from(&label); reference.identifier = identifier; match context.tail_mut() {