diff options
-rw-r--r-- | src/client.rs | 5 | ||||
-rw-r--r-- | src/server.rs | 1 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/client.rs b/src/client.rs index 7d1613c..f74e184 100644 --- a/src/client.rs +++ b/src/client.rs @@ -21,7 +21,8 @@ use std::path::{Path, PathBuf}; const DEFAULT_CHUNK_SIZE: usize = MIB as usize; const DEVNULL: &str = "/dev/null"; -#[derive(Debug, Serialize, Deserialize, Clone)] +#[derive(Debug, Deserialize, Clone)] +#[serde(deny_unknown_fields)] struct TentativeClientConfig { server_url: String, verify_tls_cert: Option<bool>, @@ -30,7 +31,7 @@ struct TentativeClientConfig { log: Option<PathBuf>, } -#[derive(Debug, Serialize, Deserialize, Clone)] +#[derive(Debug, Serialize, Clone)] pub struct ClientConfig { pub server_url: String, pub verify_tls_cert: bool, diff --git a/src/server.rs b/src/server.rs index 2bd32ef..a464c6e 100644 --- a/src/server.rs +++ b/src/server.rs @@ -7,6 +7,7 @@ use std::default::Default; use std::path::{Path, PathBuf}; #[derive(Debug, Deserialize, Clone)] +#[serde(deny_unknown_fields)] pub struct ServerConfig { pub chunks: PathBuf, pub address: String, |