summaryrefslogtreecommitdiffstats
path: root/examples/proxy.rs
diff options
context:
space:
mode:
authorArtem Vorotnikov <artem@vorotnikov.me>2019-12-14 09:01:47 +0300
committerCarl Lerche <me@carllerche.com>2019-12-13 22:01:47 -0800
commitd593c5b051f07bde5117122216a356632986b6dd (patch)
tree87df3c4dd3a4cda23ae1125e8b78358804385edb /examples/proxy.rs
parent91ecb4b4c2ec202b6754ccb5fb266a84fe3a7327 (diff)
chore: remove benches and fix/work around clippy lints (#1952)
Diffstat (limited to 'examples/proxy.rs')
-rw-r--r--examples/proxy.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/examples/proxy.rs b/examples/proxy.rs
index 48f8f057..f7a9111f 100644
--- a/examples/proxy.rs
+++ b/examples/proxy.rs
@@ -32,8 +32,12 @@ use std::error::Error;
#[tokio::main]
async fn main() -> Result<(), Box<dyn Error>> {
- let listen_addr = env::args().nth(1).unwrap_or("127.0.0.1:8081".to_string());
- let server_addr = env::args().nth(2).unwrap_or("127.0.0.1:8080".to_string());
+ let listen_addr = env::args()
+ .nth(1)
+ .unwrap_or_else(|| "127.0.0.1:8081".to_string());
+ let server_addr = env::args()
+ .nth(2)
+ .unwrap_or_else(|| "127.0.0.1:8080".to_string());
println!("Listening on: {}", listen_addr);
println!("Proxying to: {}", server_addr);