From 3a63276727dd00f4e79568a26d6177562ed1edf8 Mon Sep 17 00:00:00 2001 From: toyboot4e Date: Sun, 3 May 2020 18:16:44 +0900 Subject: [PATCH] Not to use `matches!` --- src/config.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/config.rs b/src/config.rs index 55cd3b55..1e9c0a12 100644 --- a/src/config.rs +++ b/src/config.rs @@ -142,7 +142,7 @@ impl Config { let parsed_value = serde_json::from_str(&value) .unwrap_or_else(|_| serde_json::Value::String(value.to_string())); - if matches!(&*key, "book" | "build") { + if key == "book" || key == "build" { if let serde_json::Value::Object(ref map) = parsed_value { // To `set` each `key`, we wrap them as `prefix.key` let prefix = &key; // "book" or "build"