From 6e20f818fc339dd0a67467bc6186cb276111c983 Mon Sep 17 00:00:00 2001
From: Louis Capitanchik <contact@louiscap.co>
Date: Tue, 17 Apr 2018 08:52:07 +0100
Subject: [PATCH] Fix default types and missing colon

---
 src/cli/cli.rs         | 6 +++---
 src/cli/config_file.rs | 3 +--
 2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/src/cli/cli.rs b/src/cli/cli.rs
index 363fa59..f2272d2 100644
--- a/src/cli/cli.rs
+++ b/src/cli/cli.rs
@@ -22,7 +22,7 @@ Web Server Options:
     -c=<path>, --config=<path>       Path to the .swerve config file
     -t=<num>, --threads=<num>        Number of worker threads to use for serving files; defaults to 32
 
-Data Handling Options
+Data Handling Options:
     -u, --upload                     Support file uploads to '/upload'
     -U=<path>, --upload-path=<path>  Set the url path that will accept file uploads. Implies 'upload' flag if not present
 
@@ -60,11 +60,11 @@ impl Args {
 impl Default for Args {
 	fn default() -> Self {
 		Args {
-			flag_dir: Some(""),
+			flag_dir: Some(String::from("")),
 			flag_port: Some(8000),
 			flag_config: None,
 			flag_threads: Some(32),
-			flag_address: Some("localhost"),
+			flag_address: Some(String::from("localhost")),
 			flag_help: false,
 			flag_quiet: false,
 			flag_no_index: false,
diff --git a/src/cli/config_file.rs b/src/cli/config_file.rs
index 09e088f..7723ae5 100644
--- a/src/cli/config_file.rs
+++ b/src/cli/config_file.rs
@@ -3,9 +3,8 @@ use std::convert::AsRef;
 use std::io::prelude::*;
 use std::io;
 use std::fs::File;
-use std::io::BufReader;
 use std::default::Default;
-use serde::{Deserialize, Deserializer, de::{self, Error}};
+use serde::{Deserialize, Deserializer, de};
 use std::fmt;
 use serde_yaml as yaml;
 
-- 
GitLab