aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorXe Iaso <me@xeiaso.net>2023-08-21 21:27:05 -0400
committerXe Iaso <me@xeiaso.net>2023-08-21 21:27:05 -0400
commit307c33f966458ccd8ba8ffa1a9dd46a8d1ea948a (patch)
tree90871c331f0d13ae817c160875489b5191b05168 /lib
parent6e90e78e5827872ee72c873b8907d541f95ac893 (diff)
downloadxesite-307c33f966458ccd8ba8ffa1a9dd46a8d1ea948a.tar.xz
xesite-307c33f966458ccd8ba8ffa1a9dd46a8d1ea948a.zip
lib/xesite_templates: clippy fixes
Signed-off-by: Xe Iaso <me@xeiaso.net>
Diffstat (limited to 'lib')
-rw-r--r--lib/xesite_templates/src/lib.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/xesite_templates/src/lib.rs b/lib/xesite_templates/src/lib.rs
index 26dcaec..de38177 100644
--- a/lib/xesite_templates/src/lib.rs
+++ b/lib/xesite_templates/src/lib.rs
@@ -55,8 +55,8 @@ pub fn hero(file: String, prompt: Option<String>, ai: Option<String>) -> Markup
}
pub fn conv(name: String, mood: String, body: Markup) -> Markup {
- let name_lower = name.clone().to_lowercase();
- let name = name.replace("_", " ");
+ let name_lower = name.to_lowercase();
+ let name = name.replace('_', " ");
html! {
.conversation {
@@ -142,7 +142,7 @@ pub fn toot_embed(u: User, t: Toot) -> Markup {
}
}
}
- @if t.attachment.len() != 0 {
+ @if !t.attachment.is_empty() {
br;
}
@@ -183,7 +183,7 @@ pub fn toot_embed(u: User, t: Toot) -> Markup {
pub fn xeact_component(name: &str, data: serde_json::Value) -> Markup {
let uuid = uuid::Uuid::new_v4();
- let uuid = format!("{uuid}").replace("-", "");
+ let uuid = format!("{uuid}").replace('-', "");
let script = PreEscaped(format!(
r#"