From aaa25cee2af2ec0485796bf77b11ee311722d0de Mon Sep 17 00:00:00 2001 From: Miguel de Moura <9093796+migueldemoura@users.noreply.github.com> Date: Sat, 2 Oct 2021 10:07:04 +0100 Subject: [PATCH] Fix clippy warnings (#1618) Fixes clippy warnings for the `needless_borrow` lint. https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow Removes the unused `starts_with_schema` function (dead code since 4086b075). --- .../rendering/src/codeblock/highlight.rs | 2 +- components/rendering/src/markdown.rs | 35 ------------------- .../templates/src/global_fns/load_data.rs | 10 ++++-- 3 files changed, 9 insertions(+), 38 deletions(-) diff --git a/components/rendering/src/codeblock/highlight.rs b/components/rendering/src/codeblock/highlight.rs index 4d8048b59..1262e26fb 100644 --- a/components/rendering/src/codeblock/highlight.rs +++ b/components/rendering/src/codeblock/highlight.rs @@ -236,7 +236,7 @@ mod tests { let syntax_and_theme = resolve_syntax_and_theme(Some("py"), &config); let mut highlighter = SyntaxHighlighter::new(false, syntax_and_theme); let mut out = String::new(); - for line in LinesWithEndings::from(&code) { + for line in LinesWithEndings::from(code) { out.push_str(&highlighter.highlight_line(line)); } assert!(!out.contains("