Use named parameters

This commit is contained in:
Andrey Golovizin 2021-07-14 12:07:23 +02:00
parent 2e69cfe104
commit 6a6581b64f

View file

@ -141,14 +141,17 @@ fn get_config(_opts: &Opts, config_opts: &ConfigOpts) -> Result<(), anyhow::Erro
debug!("endpoint_addr = {:?}", &endpoint_addr);
println!(
r"[Interface]
PrivateKey = {}
Address = {}
PrivateKey = {private_key}
Address = {address}
[Peer]
PublicKey = {}
Endpoint = {}
PublicKey = {public_key}
Endpoint = {endpoint_addr}
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(())
}