Clippy
Some checks failed
CI / Check links (push) Successful in 8s
CI / Check typos (push) Successful in 9s
CI / Check version (push) Failing after 5s
CI / Clippy (push) Has been cancelled
CI / Build, test, upload (push) Has been cancelled
CI / Build and push Docker image (push) Has been cancelled

This commit is contained in:
2025-11-03 23:10:42 -08:00
parent fcb4ae7055
commit 404b2e9b70
4 changed files with 9 additions and 24 deletions

View File

@@ -2,8 +2,6 @@ use maud::{Markup, Render, html};
use strum::{Display, EnumString};
#[derive(Debug, Clone, Copy, EnumString, Display)]
#[expect(clippy::allow_attributes)]
#[allow(dead_code)]
#[strum(serialize_all = "snake_case")]
pub enum FAIcon {
Github,

View File

@@ -17,7 +17,7 @@ impl Render for Markdown<'_> {
md.inline.add_rule::<InlineEmote>();
md.inline.add_rule::<InlineMdx>();
let md = md.parse(&self.0);
let md = md.parse(self.0);
let html = md.render();
return PreEscaped(html);
@@ -165,14 +165,17 @@ fn mdx_style(mdx: &str, _node: &Node, fmt: &mut dyn Renderer) -> bool {
return false;
}
#[expect(clippy::unwrap_used)] // Checked previously
let k = k.unwrap().trim();
#[expect(clippy::unwrap_used)] // Checked previously
let v = v.unwrap().trim();
match k {
"color" => {
style_str.push_str("color:");
style_str.push_str(v);
style_str.push_str(";");
style_str.push(';');
}
"color_var" => {
@@ -188,7 +191,7 @@ fn mdx_style(mdx: &str, _node: &Node, fmt: &mut dyn Renderer) -> bool {
// Only works with text, could be reworked to do basic md styling
// (italics, bold, tab, code)
fmt.open("span", &[("style", style_str)]);
fmt.text(&content);
fmt.text(content);
fmt.close("span");
return true;
@@ -225,7 +228,7 @@ fn mdx_include(mdx: &str, _node: &Node, fmt: &mut dyn Renderer) -> bool {
let args = mdx[skip..end].trim();
let trail = mdx[end + 1..].trim();
if trail != "" {
if !trail.is_empty() {
return false;
}