Skip to content

Commit f79e127

Browse files
committed
Rename config param 'addr' to the more descriptive 'address'
1 parent 7ed5cc0 commit f79e127

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

agent/src/main.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ impl Service for Api {
5959

6060
#[derive(Deserialize)]
6161
struct Config {
62-
addr: SocketAddr,
62+
address: SocketAddr,
6363
}
6464

6565
quick_main!(|| -> Result<()> {
@@ -92,11 +92,11 @@ quick_main!(|| -> Result<()> {
9292
fh.read_to_end(&mut buf).chain_err(|| "Could not read config file")?;
9393
toml::from_slice(&buf).chain_err(|| "Config file contained invalid TOML")?
9494
} else {
95-
let addr = matches.value_of("addr").unwrap().parse().chain_err(|| "Invalid server address")?;
96-
Config { addr }
95+
let address = matches.value_of("addr").unwrap().parse().chain_err(|| "Invalid server address")?;
96+
Config { address }
9797
};
9898

99-
let server = TcpServer::new(JsonProto, config.addr);
99+
let server = TcpServer::new(JsonProto, config.address);
100100
server.serve(|| Ok(Api));
101101
Ok(())
102102
});

0 commit comments

Comments
 (0)