mirror of
https://github.com/feschber/lan-mouse.git
synced 2026-03-30 08:30:55 +03:00
Fix parsing TOML key 'position' and values (#281)
* fix parsing toml key position and values * Using rename_all instead rename over each enum * rename struct field directly --------- Co-authored-by: Ferdinand Schober <ferdinand.schober@fau.de>
This commit is contained in:
@@ -61,7 +61,7 @@ struct TomlClient {
|
||||
host_name: Option<String>,
|
||||
ips: Option<Vec<IpAddr>>,
|
||||
port: Option<u16>,
|
||||
pos: Option<Position>,
|
||||
position: Option<Position>,
|
||||
activate_on_startup: Option<bool>,
|
||||
enter_hook: Option<String>,
|
||||
}
|
||||
@@ -262,7 +262,7 @@ impl From<TomlClient> for ConfigClient {
|
||||
let hostname = toml.hostname;
|
||||
let ips = HashSet::from_iter(toml.ips.into_iter().flatten());
|
||||
let port = toml.port.unwrap_or(DEFAULT_PORT);
|
||||
let pos = toml.pos.unwrap_or_default();
|
||||
let pos = toml.position.unwrap_or_default();
|
||||
Self {
|
||||
ips,
|
||||
hostname,
|
||||
|
||||
Reference in New Issue
Block a user