about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorBen Morrison <ben@gbmor.dev>2019-09-07 17:04:57 -0400
committerBen Morrison <ben@gbmor.dev>2019-09-07 17:04:57 -0400
commit644876c68d336e03319f44263ac9d5617bc7e148 (patch)
tree7a8b068cfc055c6580f6bb212eaf8dc444095cfc
parent68cf91315924d98c6860398c9951ec10f4346f5e (diff)
downloadinstistats-644876c68d336e03319f44263ac9d5617bc7e148.tar.gz
redundant variable was redundant
-rw-r--r--src/main.rs6
1 files changed, 2 insertions, 4 deletions
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();