Skip to content

Commit f0c7ad1

Browse files
committed
Refactor code-style
1 parent 565ff43 commit f0c7ad1

File tree

4 files changed

+6
-2
lines changed

4 files changed

+6
-2
lines changed

src/configuration.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -553,6 +553,8 @@ pub struct CompileOptions {
553553
/// ```
554554
pub allow_dangerous_protocol: bool,
555555

556+
// To do: `doc_markdown` is broken.
557+
#[allow(clippy::doc_markdown)]
556558
/// Default line ending to use when compiling to HTML, for line endings not
557559
/// in `value`.
558560
///

src/event.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3266,7 +3266,7 @@ pub enum Name {
32663266
/// ^
32673267
/// ```
32683268
ResourceTitleString,
3269-
/// SpaceOrTab.
3269+
/// Space or tab.
32703270
///
32713271
/// ## Info
32723272
///

src/mdast.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,8 @@ fn children_to_string(children: &[Node]) -> String {
224224
children.iter().map(ToString::to_string).collect()
225225
}
226226

227+
// To do: clippy may be right but that’s a breaking change.
228+
#[allow(clippy::to_string_trait_impl)]
227229
impl ToString for Node {
228230
fn to_string(&self) -> String {
229231
match self {

src/to_mdast.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1280,7 +1280,7 @@ fn on_exit_label_text(context: &mut CompileContext) {
12801280
.media_reference_stack
12811281
.last_mut()
12821282
.expect("expected reference on media stack");
1283-
reference.label = label.clone();
1283+
reference.label.clone_from(&label);
12841284
reference.identifier = identifier;
12851285

12861286
match context.tail_mut() {

0 commit comments

Comments
 (0)