diff options
author | Justin Mayhew <mayhew@live.ca> | 2017-02-19 15:02:31 -0400 |
---|---|---|
committer | Justin Mayhew <mayhew@live.ca> | 2017-02-19 15:02:31 -0400 |
commit | c9a8208c8a855a9417eabfab4f00551dcfab0c82 (patch) | |
tree | 199f7dde6df456c369317f55d4446580eb35e677 /examples | |
parent | 1bc2ef6affe2828604b488d39b1618a8f2b5edb6 (diff) |
Rename sender in connect example
Diffstat (limited to 'examples')
-rw-r--r-- | examples/connect.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/connect.rs b/examples/connect.rs index 9ee8c51a..93b6d5d4 100644 --- a/examples/connect.rs +++ b/examples/connect.rs @@ -104,7 +104,7 @@ impl Codec for Bytes { // Our helper method which will read data from stdin and send it along the // sender provided. -fn read_stdin(mut rx: mpsc::Sender<Vec<u8>>) { +fn read_stdin(mut tx: mpsc::Sender<Vec<u8>>) { let mut stdin = io::stdin(); loop { let mut buf = vec![0; 1024]; @@ -114,6 +114,6 @@ fn read_stdin(mut rx: mpsc::Sender<Vec<u8>>) { Ok(n) => n, }; buf.truncate(n); - rx = rx.send(buf).wait().unwrap(); + tx = tx.send(buf).wait().unwrap(); } } |