🚨 Fix clippy warnings
This commit is contained in:
@@ -116,7 +116,7 @@ async fn fetch_text(req: String) -> RequestResult<String> {
|
||||
|
||||
async fn fetch_dicebear_svg(
|
||||
r#type: &DicebearType,
|
||||
req_fields: &Vec<String>,
|
||||
req_fields: &[String],
|
||||
placeholder_fetcher: Option<Box<impl Future<Output = Option<String>>>>,
|
||||
) -> String {
|
||||
// TODO: Use configuration file
|
||||
@@ -146,7 +146,7 @@ async fn fetch_dicebear_svg(
|
||||
}
|
||||
|
||||
#[cfg(feature = "desktop")]
|
||||
fn gen_placeholder_fetcher<'a>(path: &'static str) -> Box<impl Future<Output = Option<String>>> {
|
||||
fn gen_placeholder_fetcher(path: &'static str) -> Box<impl Future<Output = Option<String>>> {
|
||||
let path = format!("./public/{}", &path);
|
||||
Box::new(async move {
|
||||
match read_to_string(&path).await {
|
||||
|
@@ -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);
|
||||
|
@@ -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! {
|
||||
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");
|
||||
|
@@ -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! {
|
||||
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,
|
||||
|
Reference in New Issue
Block a user