Skip to content

Commit 1b0f876

Browse files
authored
Merge pull request #2511 from ibraheemdev/patch-1
Update 16-11 to use method call expression for `clone`
2 parents 5e02507 + 6bb2981 commit 1b0f876

File tree

1 file changed

+1
-1
lines changed
  • listings/ch16-fearless-concurrency/listing-16-11/src

1 file changed

+1
-1
lines changed

listings/ch16-fearless-concurrency/listing-16-11/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ fn main() {
88

99
let (tx, rx) = mpsc::channel();
1010

11-
let tx1 = mpsc::Sender::clone(&tx);
11+
let tx1 = tx.clone();
1212
thread::spawn(move || {
1313
let vals = vec![
1414
String::from("hi"),

0 commit comments

Comments
 (0)