neon_arch commited on
Commit
4013857
β€’
1 Parent(s): 7b392b3

🚨 chore: make clippy checks happy (#461)

Browse files
src/templates/partials/settings_tabs/engines.rs CHANGED
@@ -26,7 +26,7 @@ pub fn engines(engine_names: &HashMap<String, bool>) -> Markup {
26
  // Checks whether all the engines are selected or not if they are then the
27
  // checked `select_all` button is rendered otherwise the unchecked version
28
  // is rendered.
29
- @if engine_names.values().all(|selected| *selected == true){
30
  .toggle_btn{
31
  label class="switch"{
32
  input type="checkbox" class="select_all" onchange="toggleAllSelection()" checked;
@@ -49,7 +49,7 @@ pub fn engines(engine_names: &HashMap<String, bool>) -> Markup {
49
  // Checks whether the `engine_name` is selected or not if they are then the
50
  // checked `engine` button is rendered otherwise the unchecked version is
51
  // rendered.
52
- @if *selected == true {
53
  .toggle_btn{
54
  label class="switch"{
55
  input type="checkbox" class="engine" checked;
 
26
  // Checks whether all the engines are selected or not if they are then the
27
  // checked `select_all` button is rendered otherwise the unchecked version
28
  // is rendered.
29
+ @if engine_names.values().all(|selected| *selected){
30
  .toggle_btn{
31
  label class="switch"{
32
  input type="checkbox" class="select_all" onchange="toggleAllSelection()" checked;
 
49
  // Checks whether the `engine_name` is selected or not if they are then the
50
  // checked `engine` button is rendered otherwise the unchecked version is
51
  // rendered.
52
+ @if *selected {
53
  .toggle_btn{
54
  label class="switch"{
55
  input type="checkbox" class="engine" checked;
src/templates/partials/settings_tabs/general.rs CHANGED
@@ -25,7 +25,7 @@ pub fn general(safe_search_level: u8) -> Markup {
25
  @if safe_search_level < 3 {
26
  select name="safe_search_levels" {
27
  // Sets the user selected safe_search_level name from the config file as the first option in the selection list.
28
- option value=(safe_search_level){(SAFE_SEARCH_LEVELS.iter().filter(|level| level.0 == safe_search_level).next().unwrap().1)}
29
  @for (k,v) in SAFE_SEARCH_LEVELS.iter().filter(|level| level.0 != safe_search_level){
30
  option value=(k){(v)}
31
  }
 
25
  @if safe_search_level < 3 {
26
  select name="safe_search_levels" {
27
  // Sets the user selected safe_search_level name from the config file as the first option in the selection list.
28
+ option value=(safe_search_level){(SAFE_SEARCH_LEVELS.iter().find(|level| level.0 == safe_search_level).unwrap().1)}
29
  @for (k,v) in SAFE_SEARCH_LEVELS.iter().filter(|level| level.0 != safe_search_level){
30
  option value=(k){(v)}
31
  }
src/templates/partials/settings_tabs/user_interface.rs CHANGED
@@ -85,7 +85,7 @@ pub fn user_interface(
85
  select name="animations"{
86
  // Sets the user selected animation name from the config file as the first option in the selection list.
87
  option value=(animation.as_ref().unwrap_or(&"".to_owned())){(animation.as_ref().unwrap_or(&"".to_owned()).replace('-'," "))}
88
- @for (k,v) in style_option_list("animations", &animation.as_ref().unwrap_or(&"".to_owned()))?{
89
  option value=(k){(v)}
90
  }
91
  }
 
85
  select name="animations"{
86
  // Sets the user selected animation name from the config file as the first option in the selection list.
87
  option value=(animation.as_ref().unwrap_or(&"".to_owned())){(animation.as_ref().unwrap_or(&"".to_owned()).replace('-'," "))}
88
+ @for (k,v) in style_option_list("animations", animation.as_ref().unwrap_or(&"".to_owned()))?{
89
  option value=(k){(v)}
90
  }
91
  }