Skip to content

Commit

Permalink
Refactor code-style
Browse files Browse the repository at this point in the history
  • Loading branch information
wooorm committed Jun 10, 2024
1 parent 565ff43 commit f0c7ad1
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/configuration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
///
Expand Down
2 changes: 1 addition & 1 deletion src/event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3266,7 +3266,7 @@ pub enum Name {
/// ^
/// ```
ResourceTitleString,
/// SpaceOrTab.
/// Space or tab.
///
/// ## Info
///
Expand Down
2 changes: 2 additions & 0 deletions src/mdast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion src/to_mdast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit f0c7ad1

Please sign in to comment.