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:
parent
7b392b369d
commit
40138572be
@ -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
|
||||
// checked `select_all` button is rendered otherwise the unchecked version
|
||||
// is rendered.
|
||||
@if engine_names.values().all(|selected| *selected == true){
|
||||
@if engine_names.values().all(|selected| *selected){
|
||||
.toggle_btn{
|
||||
label class="switch"{
|
||||
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
|
||||
// checked `engine` button is rendered otherwise the unchecked version is
|
||||
// rendered.
|
||||
@if *selected == true {
|
||||
@if *selected {
|
||||
.toggle_btn{
|
||||
label class="switch"{
|
||||
input type="checkbox" class="engine" checked;
|
||||
|
@ -25,7 +25,7 @@ pub fn general(safe_search_level: u8) -> Markup {
|
||||
@if safe_search_level < 3 {
|
||||
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.
|
||||
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){
|
||||
option value=(k){(v)}
|
||||
}
|
||||
|
@ -85,7 +85,7 @@ pub fn user_interface(
|
||||
select name="animations"{
|
||||
// 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('-'," "))}
|
||||
@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)}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user