diff options
| author | metamuffin <metamuffin@disroot.org> | 2026-03-07 23:28:45 +0100 |
|---|---|---|
| committer | metamuffin <metamuffin@disroot.org> | 2026-03-07 23:28:45 +0100 |
| commit | 9d1e1772c02032f70b6db584dddae8fd06b490d6 (patch) | |
| tree | 9d97b4d3e1252c4b99f30a19f339700eaab44c45 /ui/src/components | |
| parent | d1b7691adb7c40bf21053d324fdac16c544cd536 (diff) | |
| download | jellything-9d1e1772c02032f70b6db584dddae8fd06b490d6.tar jellything-9d1e1772c02032f70b6db584dddae8fd06b490d6.tar.bz2 jellything-9d1e1772c02032f70b6db584dddae8fd06b490d6.tar.zst | |
manual clippy
Diffstat (limited to 'ui/src/components')
| -rw-r--r-- | ui/src/components/node_card.rs | 28 | ||||
| -rw-r--r-- | ui/src/components/node_page.rs | 5 |
2 files changed, 17 insertions, 16 deletions
diff --git a/ui/src/components/node_card.rs b/ui/src/components/node_card.rs index 36bd3e2..3aae631 100644 --- a/ui/src/components/node_card.rs +++ b/ui/src/components/node_card.rs @@ -18,20 +18,20 @@ markup::define! { NodeCard<'a>(ri: &'a RenderInfo<'a>, nku: &'a Nku<'a>) { @let node = &nku.node; @let slug = node.get(NO_SLUG).unwrap_or_default(); - div[class=&format!("card {}", aspect_class(&node))] { + div[class=&format!("card {}", aspect_class(node))] { .poster { - a[href=u_node_slug(&slug)] { - img[src=cover_image(&node, 512), loading="lazy"]; + a[href=u_node_slug(slug)] { + img[src=cover_image(node, 512), loading="lazy"]; } .overlay { @if node.has(NO_TRACK.0) { - a.play.icon[href=u_node_slug_player(&slug)] { "play_arrow" } + a.play.icon[href=u_node_slug_player(slug)] { "play_arrow" } } @Props { ri, nku, full: false } } } div.title { - a[href=u_node_slug(&slug)] { + a[href=u_node_slug(slug)] { @node.get(NO_TITLE) } } @@ -48,17 +48,17 @@ markup::define! { @let slug = node.get(NO_SLUG).unwrap_or_default(); div[class="card wide"] { div[class=&format!("poster {}", aspect_class(node))] { - a[href=u_node_slug(&slug)] { - img[src=cover_image(&node, 512), loading="lazy"]; + a[href=u_node_slug(slug)] { + img[src=cover_image(node, 512), loading="lazy"]; } .overlay { @if node.has(NO_TRACK.0) { - a.play.icon[href=u_node_slug_player(&slug)] { "play_arrow" } + a.play.icon[href=u_node_slug_player(slug)] { "play_arrow" } } } } div.details { - a.title[href=u_node_slug(&slug)] { @node.get(NO_TITLE) } + a.title[href=u_node_slug(slug)] { @node.get(NO_TITLE) } @Props { ri, nku ,full: false } span.overview { @node.get(NO_DESCRIPTION) } } @@ -73,16 +73,16 @@ markup::define! { .inner { div.overview { h2 { a[href=u_node_slug(slug)] { @node.get(NO_TITLE) } } - @Props { ri, nku: *nku, full: false } + @Props { ri, nku, full: false } p { b { @node.get(NO_TAGLINE) } " " @node.get(NO_DESCRIPTION) } } div[class=&format!("poster {}", aspect_class(node))] { - a[href=u_node_slug(&slug)] { - img[src=cover_image(&node, 512), loading="lazy"]; + a[href=u_node_slug(slug)] { + img[src=cover_image(node, 512), loading="lazy"]; } .overlay { @if node.has(NO_TRACK.0) { - a.play.icon[href=u_node_slug_player(&slug)] { "play_arrow" } + a.play.icon[href=u_node_slug_player(slug)] { "play_arrow" } } } } @@ -100,5 +100,5 @@ fn cover_image(node: &Object, size: usize) -> String { { return u_image_fallback_person(title, 512); } - return String::new(); + String::new() } diff --git a/ui/src/components/node_page.rs b/ui/src/components/node_page.rs index f640ec7..53dd904 100644 --- a/ui/src/components/node_page.rs +++ b/ui/src/components/node_page.rs @@ -166,7 +166,7 @@ markup::define! { }} } @if !credited.is_empty() { - h2 { @tr(ri.lang, &format!("node.credited")) } + h2 { @tr(ri.lang, "node.credited") } ul.nl.grid { @for nku in *credited { li { @NodeCard { ri, nku } } }} @@ -205,7 +205,8 @@ pub fn aspect_class(node: &Object) -> &'static str { KIND_SEASON | KIND_SHOW | KIND_PERSON | KIND_SERIES | KIND_MOVIE | KIND_SHORTFORMVIDEO => { "aspect-port" } - KIND_CHANNEL | KIND_MUSIC | _ => "aspect-square", + KIND_CHANNEL | KIND_MUSIC => "aspect-square", + _ => unreachable!(), } } |