Skip to content

Commit 75516e0

Browse files
clippy fixes
1 parent fd893c9 commit 75516e0

2 files changed

Lines changed: 4 additions & 6 deletions

File tree

src/lib.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ fn codeblock_parser(chapter: &mut Chapter) -> Result<String, std::fmt::Error> {
7979
let style =
8080
"style='display: flex; flex-wrap: wrap; justify-content: space-around; align-items: center;' ";
8181
events.push(Html(
82-
format!("\n\n<div {}class='{}'>\n", style, block_type).into(),
82+
format!("\n\n<div {style}class='{block_type}'>\n").into(),
8383
));
8484
in_block = Some(block_type.to_string());
8585
}
@@ -207,16 +207,14 @@ Some **markdown** text
207207
fn process_with_crlf() {
208208
// crlf-separated text seems to be parsed into multiple Text events;
209209
// check the fenced code block is still processed as a single unit.
210-
let content = vec![
211-
"Some **markdown** text",
210+
let content = ["Some **markdown** text",
212211
"",
213212
"```svgdx",
214213
"<svg>",
215214
r#" <rect wh="20 5"/>"#,
216215
r#" <rect xy="^|h" wh="20 5"/>"#,
217216
"</svg>",
218-
"```",
219-
]
217+
"```"]
220218
.join("\r\n");
221219

222220
let expected1 = r##"Some **markdown** text

src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ fn main() {
3030
if let Some(sub_args) = matches.subcommand_matches("supports") {
3131
handle_supports(&preprocessor, sub_args);
3232
} else if let Err(e) = handle_preprocessing(&preprocessor) {
33-
eprintln!("{}", e);
33+
eprintln!("{e}");
3434
process::exit(1);
3535
}
3636
}

0 commit comments

Comments
 (0)