mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-04-01 18:25:30 +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
|
|
@ -9,7 +9,7 @@ use aquatic_toml_config::TomlConfig;
|
|||
|
||||
/// aquatic_udp_load_test configuration
|
||||
#[derive(Clone, Debug, PartialEq, TomlConfig, Deserialize)]
|
||||
#[serde(default)]
|
||||
#[serde(default, deny_unknown_fields)]
|
||||
pub struct Config {
|
||||
/// Server address
|
||||
///
|
||||
|
|
@ -43,7 +43,7 @@ impl Default for Config {
|
|||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, TomlConfig, Deserialize)]
|
||||
#[serde(default)]
|
||||
#[serde(default, deny_unknown_fields)]
|
||||
pub struct NetworkConfig {
|
||||
/// True means bind to one localhost IP per socket.
|
||||
///
|
||||
|
|
@ -86,7 +86,7 @@ impl Default for NetworkConfig {
|
|||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, TomlConfig, Deserialize)]
|
||||
#[serde(default)]
|
||||
#[serde(default, deny_unknown_fields)]
|
||||
pub struct RequestConfig {
|
||||
/// Number of torrents to simulate
|
||||
pub number_of_torrents: usize,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue