]> git.lizzy.rs Git - rust.git/commitdiff
Remove unnecessary refs
authornasso <nassomails@gmail.com>
Sun, 11 Oct 2020 15:47:34 +0000 (17:47 +0200)
committernasso <nassomails@gmail.com>
Tue, 13 Oct 2020 08:46:22 +0000 (10:46 +0200)
src/librustdoc/html/render/mod.rs

index a9d4c2cc813df28182c05d2a6b2a8441f60b6314..b7b9bc5e1c0793fb86a87864f6fde7b08ae35957 100644 (file)
@@ -1365,7 +1365,7 @@ enum Setting {
 impl Setting {
     fn display(&self, root_path: &str, suffix: &str) -> String {
         match *self {
-            Setting::Section { ref description, ref sub_settings } => format!(
+            Setting::Section { description, ref sub_settings } => format!(
                 "<div class='setting-line'>\
                      <div class='title'>{}</div>\
                      <div class='sub-settings'>{}</div>
@@ -1373,7 +1373,7 @@ fn display(&self, root_path: &str, suffix: &str) -> String {
                 description,
                 sub_settings.iter().map(|s| s.display(root_path, suffix)).collect::<String>()
             ),
-            Setting::Toggle { ref js_data_name, ref description, ref default_value } => format!(
+            Setting::Toggle { js_data_name, description, default_value } => format!(
                 "<div class='setting-line'>\
                      <label class='toggle'>\
                      <input type='checkbox' id='{}' {}>\
@@ -1382,15 +1382,10 @@ fn display(&self, root_path: &str, suffix: &str) -> String {
                      <div>{}</div>\
                  </div>",
                 js_data_name,
-                if *default_value { " checked" } else { "" },
+                if default_value { " checked" } else { "" },
                 description,
             ),
-            Setting::Select {
-                ref js_data_name,
-                ref description,
-                ref default_value,
-                ref options,
-            } => format!(
+            Setting::Select { js_data_name, description, default_value, ref options } => format!(
                 "<div class='setting-line'>\
                      <div>{}</div>\
                      <label class='select-wrapper'>\
@@ -1405,7 +1400,7 @@ fn display(&self, root_path: &str, suffix: &str) -> String {
                     .map(|opt| format!(
                         "<option value=\"{}\" {}>{}</option>",
                         opt.0,
-                        if &opt.0 == *default_value { "selected" } else { "" },
+                        if &opt.0 == default_value { "selected" } else { "" },
                         opt.1,
                     ))
                     .collect::<String>(),