From bb6957e638d39d7fd7b60a873b6177db1369fd2d Mon Sep 17 00:00:00 2001 From: alemi Date: Thu, 26 Dec 2024 15:36:01 +0100 Subject: [PATCH] chore(web): clippy lints --- web/src/components/post.rs | 6 ++---- web/src/objects/item.rs | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/web/src/components/post.rs b/web/src/components/post.rs index cb3e09a..01fd3b0 100644 --- a/web/src/components/post.rs +++ b/web/src/components/post.rs @@ -47,10 +47,7 @@ pub enum Privacy { impl Privacy { pub fn is_public(&self) -> bool { - match self { - Self::Broadcast | Self::Public => true, - _ => false, - } + matches!(self, Self::Broadcast | Self::Public) } pub fn from_value(v: &str) -> Self { @@ -429,6 +426,7 @@ fn get_vec_if_some(node: NodeRef) -> Vec { ).unwrap_or_default() } +#[allow(unused)] fn get_checked(node: NodeRef) -> bool { node.get() .map(|x| x.checked()) diff --git a/web/src/objects/item.rs b/web/src/objects/item.rs index c01f382..48261f6 100644 --- a/web/src/objects/item.rs +++ b/web/src/objects/item.rs @@ -3,7 +3,7 @@ use std::sync::Arc; use leptos::*; use crate::{prelude::*, URL_SENSITIVE}; -use apb::{target::Addressed, ActivityMut, Base, Collection, CollectionMut, Object, ObjectMut, Shortcuts}; +use apb::{ActivityMut, Base, Collection, CollectionMut, Object, ObjectMut, Shortcuts}; #[component] pub fn Object(object: crate::Object) -> impl IntoView {