From 644876c68d336e03319f44263ac9d5617bc7e148 Mon Sep 17 00:00:00 2001 From: Ben Morrison Date: Sat, 7 Sep 2019 17:04:57 -0400 Subject: redundant variable was redundant --- src/main.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/main.rs b/src/main.rs index 6a8d5bd..cd9ece8 100644 --- a/src/main.rs +++ b/src/main.rs @@ -72,19 +72,17 @@ fn main() { let last_generated = Utc::now().to_rfc2822(); - let mut conf_yaml = Server { + let conf_yaml = Server { name: conf_yaml["name"].as_str().unwrap().to_string(), url: conf_yaml["url"].as_str().unwrap().to_string(), signup_url: conf_yaml["signup_url"].as_str().unwrap().to_string(), - user_count: 0, + user_count, want_users: conf_yaml["want_users"].as_bool().unwrap(), admin_email: conf_yaml["admin_email"].as_str().unwrap().to_string(), description: conf_yaml["description"].as_str().unwrap().to_string(), last_generated, }; - conf_yaml.user_count = user_count; - let json = serde_json::to_string(&conf_yaml).unwrap(); fs::write(out_path, &json).unwrap(); -- cgit 1.4.1-2-gfad0