]> git.lizzy.rs Git - rust.git/blobdiff - src/config.rs
Add explicit lifetime
[rust.git] / src / config.rs
index 3c1afe8ddfa082e1a1583ddd82983bbacbb907a1..30d79cdc562983b00017c01c574c3b4e346d0e4c 100644 (file)
@@ -306,7 +306,7 @@ pub fn from_toml(toml: &str) -> Result<Config, String> {
                     let table = parsed
                         .as_table()
                         .ok_or(String::from("Parsed config was not table"))?;
-                    for (key, _) in table {
+                    for key in table.keys() {
                         match &**key {
                             $(
                                 stringify!($i) => (),
@@ -611,6 +611,15 @@ pub fn get_toml_path(dir: &Path) -> Result<Option<PathBuf>, Error> {
                                              threshold.";
     remove_blank_lines_at_start_or_end_of_block: bool, true,
         "Remove blank lines at start or end of a block";
+    attributes_on_same_line_as_field: bool, true,
+        "Try to put attributes on the same line as fields.";
+    attributes_on_same_line_as_variant: bool, true,
+        "Try to put attributes on the same line as variants in enum declarations.";
+    multiline_closure_forces_block: bool, false,
+        "Force multiline closure bodies to be wrapped in a block";
+    multiline_match_arm_forces_block: bool, false,
+        "Force multiline match arm bodies to be wrapped in a block";
+    merge_derives: bool, true, "Merge multiple `#[derive(...)]` into a single one";
 }
 
 #[cfg(test)]