Use named parameters
This commit is contained in:
parent
2e69cfe104
commit
6a6581b64f
1 changed files with 8 additions and 5 deletions
13
src/main.rs
13
src/main.rs
|
|
@ -141,14 +141,17 @@ fn get_config(_opts: &Opts, config_opts: &ConfigOpts) -> Result<(), anyhow::Erro
|
||||||
debug!("endpoint_addr = {:?}", &endpoint_addr);
|
debug!("endpoint_addr = {:?}", &endpoint_addr);
|
||||||
println!(
|
println!(
|
||||||
r"[Interface]
|
r"[Interface]
|
||||||
PrivateKey = {}
|
PrivateKey = {private_key}
|
||||||
Address = {}
|
Address = {address}
|
||||||
|
|
||||||
[Peer]
|
[Peer]
|
||||||
PublicKey = {}
|
PublicKey = {public_key}
|
||||||
Endpoint = {}
|
Endpoint = {endpoint_addr}
|
||||||
AllowedIPs = 0.0.0.0/0 #, ::/0",
|
AllowedIPs = 0.0.0.0/0 #, ::/0",
|
||||||
&keys.private_key, &config.data.address, &config.data.public_key, &endpoint_addr
|
public_key = &config.data.public_key,
|
||||||
|
private_key = &keys.private_key,
|
||||||
|
address = &config.data.address,
|
||||||
|
endpoint_addr = &endpoint_addr,
|
||||||
);
|
);
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue