diff options
author | boastful-squirrel <boastful.squirrel@gmail.com> | 2019-04-15 15:35:09 +0000 |
---|---|---|
committer | boastful-squirrel <boastful.squirrel@gmail.com> | 2019-04-15 15:35:09 +0000 |
commit | 731a6e011cf4efd7019f516febf1f06b5398fe41 (patch) | |
tree | 2dac0cd335f1058d62fd103eeb9f736ca94cd687 | |
parent | Improved comment (diff) | |
download | miniserve-731a6e011cf4efd7019f516febf1f06b5398fe41.tar.gz miniserve-731a6e011cf4efd7019f516febf1f06b5398fe41.zip |
Use to_string() and fix comment
-rw-r--r-- | src/main.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs index 3daca07..a413f2b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -92,7 +92,7 @@ fn main() { if interface == IpAddr::V4(Ipv4Addr::new(0, 0, 0, 0)) { // If the interface is 0.0.0.0, we'll change it to 127.0.0.1 so that clicking the link will // also work on Windows. Why can't Windows interpret 0.0.0.0? - String::from("127.0.0.1") + "127.0.0.1".to_string() } else if interface.is_ipv6() { // If the interface is IPv6 then we'll print it with brackets so that it is clickable. format!("[{}]", interface) @@ -171,7 +171,7 @@ fn main() { .collect::<Result<Vec<SocketAddr>, _>>(); // Note that this should never fail, since CLI parsing succeeded - // This means the format of the IP address is valid, and so is the port + // This means the format of each IP address is valid, and so is the port // Valid IpAddr + valid port == valid SocketAddr let socket_addresses = socket_addresses.expect("Failed to parse string as socket address"); |