mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-03-31 17:55:36 +00:00
Exit with error message on unrecognized config keys
This commit is contained in:
parent
a852b290ca
commit
cedf0b61ca
10 changed files with 27 additions and 26 deletions
|
|
@ -7,7 +7,7 @@ use serde::Deserialize;
|
|||
|
||||
/// aquatic_ws_load_test configuration
|
||||
#[derive(Clone, Debug, PartialEq, TomlConfig, Deserialize)]
|
||||
#[serde(default)]
|
||||
#[serde(default, deny_unknown_fields)]
|
||||
pub struct Config {
|
||||
pub server_address: SocketAddr,
|
||||
pub log_level: LogLevel,
|
||||
|
|
@ -41,7 +41,7 @@ impl Default for Config {
|
|||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, TomlConfig, Deserialize)]
|
||||
#[serde(default)]
|
||||
#[serde(default, deny_unknown_fields)]
|
||||
pub struct TorrentConfig {
|
||||
pub offers_per_request: usize,
|
||||
pub number_of_torrents: usize,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue