0
0
mirror of https://github.com/neon-mmd/websurfx.git synced 2024-11-21 13:38:21 -05:00

🚨 chore: make clippy checks happy (#461)

This commit is contained in:
neon_arch 2023-12-28 20:15:38 +03:00
parent 7b392b369d
commit 40138572be
3 changed files with 4 additions and 4 deletions

View File

@ -26,7 +26,7 @@ pub fn engines(engine_names: &HashMap<String, bool>) -> Markup {
// Checks whether all the engines are selected or not if they are then the // Checks whether all the engines are selected or not if they are then the
// checked `select_all` button is rendered otherwise the unchecked version // checked `select_all` button is rendered otherwise the unchecked version
// is rendered. // is rendered.
@if engine_names.values().all(|selected| *selected == true){ @if engine_names.values().all(|selected| *selected){
.toggle_btn{ .toggle_btn{
label class="switch"{ label class="switch"{
input type="checkbox" class="select_all" onchange="toggleAllSelection()" checked; input type="checkbox" class="select_all" onchange="toggleAllSelection()" checked;
@ -49,7 +49,7 @@ pub fn engines(engine_names: &HashMap<String, bool>) -> Markup {
// Checks whether the `engine_name` is selected or not if they are then the // Checks whether the `engine_name` is selected or not if they are then the
// checked `engine` button is rendered otherwise the unchecked version is // checked `engine` button is rendered otherwise the unchecked version is
// rendered. // rendered.
@if *selected == true { @if *selected {
.toggle_btn{ .toggle_btn{
label class="switch"{ label class="switch"{
input type="checkbox" class="engine" checked; input type="checkbox" class="engine" checked;

View File

@ -25,7 +25,7 @@ pub fn general(safe_search_level: u8) -> Markup {
@if safe_search_level < 3 { @if safe_search_level < 3 {
select name="safe_search_levels" { select name="safe_search_levels" {
// Sets the user selected safe_search_level name from the config file as the first option in the selection list. // Sets the user selected safe_search_level name from the config file as the first option in the selection list.
option value=(safe_search_level){(SAFE_SEARCH_LEVELS.iter().filter(|level| level.0 == safe_search_level).next().unwrap().1)} option value=(safe_search_level){(SAFE_SEARCH_LEVELS.iter().find(|level| level.0 == safe_search_level).unwrap().1)}
@for (k,v) in SAFE_SEARCH_LEVELS.iter().filter(|level| level.0 != safe_search_level){ @for (k,v) in SAFE_SEARCH_LEVELS.iter().filter(|level| level.0 != safe_search_level){
option value=(k){(v)} option value=(k){(v)}
} }

View File

@ -85,7 +85,7 @@ pub fn user_interface(
select name="animations"{ select name="animations"{
// Sets the user selected animation name from the config file as the first option in the selection list. // Sets the user selected animation name from the config file as the first option in the selection list.
option value=(animation.as_ref().unwrap_or(&"".to_owned())){(animation.as_ref().unwrap_or(&"".to_owned()).replace('-'," "))} option value=(animation.as_ref().unwrap_or(&"".to_owned())){(animation.as_ref().unwrap_or(&"".to_owned()).replace('-'," "))}
@for (k,v) in style_option_list("animations", &animation.as_ref().unwrap_or(&"".to_owned()))?{ @for (k,v) in style_option_list("animations", animation.as_ref().unwrap_or(&"".to_owned()))?{
option value=(k){(v)} option value=(k){(v)}
} }
} }