From 46644d0c6c9fb18edb23aeda834b24f5dcbc86fa Mon Sep 17 00:00:00 2001 From: Tonni Tielens Date: Tue, 30 Jul 2019 16:52:24 +0200 Subject: [PATCH] Shorten statement by using clone method on Sender instance --- src/ch16-02-message-passing.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ch16-02-message-passing.md b/src/ch16-02-message-passing.md index 7cb4cfa8d3..3a4812ada1 100644 --- a/src/ch16-02-message-passing.md +++ b/src/ch16-02-message-passing.md @@ -298,7 +298,7 @@ so by cloning the transmitting half of the channel, as shown in Listing 16-11: let (tx, rx) = mpsc::channel(); -let tx1 = mpsc::Sender::clone(&tx); +let tx1 = tx.clone(); thread::spawn(move || { let vals = vec![ String::from("hi"),