🚨 Fix clippy warnings

This commit is contained in:
2024-05-10 20:09:19 +02:00
parent c2918fbc78
commit 692a71faef
4 changed files with 21 additions and 23 deletions

View File

@@ -3,7 +3,6 @@ use dioxus::prelude::*;
use dioxus_free_icons::icons::fa_solid_icons::{
FaComments, FaLayerGroup, FaMagnifyingGlass, FaPeopleGroup,
};
use dioxus_free_icons::icons::md_navigation_icons::MdArrowDropDown;
use dioxus_free_icons::{Icon, IconShape};
turf::style_sheet!("src/ui/components/icons.scss");
@@ -26,9 +25,6 @@ macro_rules! transparent_icon {
};
}
// TODO: Remove this icon once the conversation panel finished
transparent_icon!(DownArrowIcon, MdArrowDropDown);
transparent_icon!(SearchIcon, FaMagnifyingGlass);
transparent_icon!(SpacesIcon, FaLayerGroup);
transparent_icon!(ChatsIcon, FaComments);

View File

@@ -538,7 +538,7 @@ fn generate_modal(
on_confirm: on_confirm,
div {
{rendered_suggestions.into_iter()}
{rendered_suggestions.iter()}
}
}
}
@@ -608,15 +608,16 @@ pub fn Login() -> Element {
generate_random_svg_shape(Some(&shape_config)).await
});
let avatar = match &*random_avatar_future.read_unchecked() {
Some(svg) => Some(rsx! {
div {
class: ClassName::LOGIN_AVATAR_CONTENT,
dangerous_inner_html: svg.as_str(),
let avatar = (*random_avatar_future.read_unchecked())
.as_ref()
.map(|svg| {
rsx! {
div {
class: ClassName::LOGIN_AVATAR_CONTENT,
dangerous_inner_html: svg.as_str(),
}
}
}),
None => None,
};
});
if *spinner_animated.read() && SESSION.read().is_logged {
debug!("Stop spinner");

View File

@@ -59,15 +59,16 @@ pub fn Modal(props: ModalProps) -> Element {
let random_figure_future =
use_resource(move || async move { generate_random_svg_avatar(avatar_config).await });
let icon = match &*random_figure_future.read_unchecked() {
Some(svg) => Some(rsx! {
div {
class: ClassName::MODAL_CONTENT_ICON_PLACEHOLDER,
dangerous_inner_html: svg.as_str(),
let icon = (*random_figure_future.read_unchecked())
.as_ref()
.map(|svg| {
rsx! {
div {
class: ClassName::MODAL_CONTENT_ICON_PLACEHOLDER,
dangerous_inner_html: svg.as_str(),
}
}
}),
None => None,
};
});
let button_class = match &props.severity {
Severity::Ok => SuccessButton,