This commit is contained in:
Sijie.Sun
2024-08-08 22:03:22 +08:00
committed by GitHub
parent 2bc4dd8c53
commit 232165eff3
5 changed files with 347 additions and 19 deletions

View File

@@ -360,14 +360,12 @@ impl From<Cli> for TomlConfigLoader {
cfg.set_dhcp(cli.dhcp);
if !cli.dhcp {
if let Some(ipv4) = &cli.ipv4 {
cfg.set_ipv4(Some(
ipv4.parse()
.with_context(|| format!("failed to parse ipv4 address: {}", ipv4))
.unwrap(),
))
}
if let Some(ipv4) = &cli.ipv4 {
cfg.set_ipv4(Some(
ipv4.parse()
.with_context(|| format!("failed to parse ipv4 address: {}", ipv4))
.unwrap(),
))
}
cfg.set_peers(