diff options
author | David Knaack <davidkna@users.noreply.github.com> | 2023-01-27 10:33:24 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-27 18:33:24 +0900 |
commit | 5e123fcbcea4f813808380bc285eee5c73b1c84b (patch) | |
tree | fdc17258c3dcf309c4929694475ff36043a05031 /src/configure.rs | |
parent | 21090b2e9455e0aa0bc45d43470283eac1565d5d (diff) |
chore: fix clippy warnings for rust 1.67 (#4855)
Diffstat (limited to 'src/configure.rs')
-rw-r--r-- | src/configure.rs | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/configure.rs b/src/configure.rs index 3cb209f66..d266e0b79 100644 --- a/src/configure.rs +++ b/src/configure.rs @@ -130,9 +130,7 @@ pub fn print_configuration(use_default: bool, paths: &[String]) { fn extract_toml_paths(mut config: toml::Value, paths: &[String]) -> toml::Value { // Extract all the requested sections into a new configuration. let mut subset = toml::value::Table::new(); - let config = if let Some(config) = config.as_table_mut() { - config - } else { + let Some(config) = config.as_table_mut() else { // This function doesn't make any sense if the root is not a table. return toml::Value::Table(subset); }; @@ -156,9 +154,7 @@ fn extract_toml_paths(mut config: toml::Value, paths: &[String]) -> toml::Value } // Extract the value to move. - let value = if let Some(value) = source_cursor.remove(end) { - value - } else { + let Some(value) = source_cursor.remove(end) else { // We didn't find a value for this path, so move on to the next path. continue 'paths; }; |