chore(web): clippy lints

This commit is contained in:
əlemi 2024-12-26 15:36:01 +01:00
parent 0b6091e764
commit bb6957e638
Signed by: alemi
GPG key ID: A4895B84D311642C
2 changed files with 3 additions and 5 deletions

View file

@ -47,10 +47,7 @@ pub enum Privacy {
impl Privacy { impl Privacy {
pub fn is_public(&self) -> bool { pub fn is_public(&self) -> bool {
match self { matches!(self, Self::Broadcast | Self::Public)
Self::Broadcast | Self::Public => true,
_ => false,
}
} }
pub fn from_value(v: &str) -> Self { pub fn from_value(v: &str) -> Self {
@ -429,6 +426,7 @@ fn get_vec_if_some(node: NodeRef<html::Input>) -> Vec<String> {
).unwrap_or_default() ).unwrap_or_default()
} }
#[allow(unused)]
fn get_checked(node: NodeRef<html::Input>) -> bool { fn get_checked(node: NodeRef<html::Input>) -> bool {
node.get() node.get()
.map(|x| x.checked()) .map(|x| x.checked())

View file

@ -3,7 +3,7 @@ use std::sync::Arc;
use leptos::*; use leptos::*;
use crate::{prelude::*, URL_SENSITIVE}; 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] #[component]
pub fn Object(object: crate::Object) -> impl IntoView { pub fn Object(object: crate::Object) -> impl IntoView {