Skip to content

Commit

Permalink
Remove unneeded mutable reference
Browse files Browse the repository at this point in the history
Fixes #1953.
  • Loading branch information
carols10cents committed Jan 30, 2020
1 parent a3c2cae commit 1d0b5e6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion listings/ch20-web-server/listing-20-24/src/lib.rs
Expand Up @@ -54,7 +54,7 @@ impl Drop for ThreadPool {
fn drop(&mut self) {
println!("Sending terminate message to all workers.");

for _ in &mut self.workers {
for _ in &self.workers {
self.sender.send(Message::Terminate).unwrap();
}

Expand Down
2 changes: 1 addition & 1 deletion listings/ch20-web-server/listing-20-25/src/lib.rs
Expand Up @@ -54,7 +54,7 @@ impl Drop for ThreadPool {
fn drop(&mut self) {
println!("Sending terminate message to all workers.");

for _ in &mut self.workers {
for _ in &self.workers {
self.sender.send(Message::Terminate).unwrap();
}

Expand Down

0 comments on commit 1d0b5e6

Please sign in to comment.