Destructure in for loop
This commit is contained in:
parent
c50d9f3683
commit
2845ce5bc6
1 changed files with 1 additions and 3 deletions
|
@ -109,9 +109,7 @@ fn client_loop(task_rx: Receiver<Task>, mut process: Process) {
|
|||
Some(it) => it,
|
||||
};
|
||||
|
||||
for task in task_rx {
|
||||
let Task { req, result_tx } = task;
|
||||
|
||||
for Task { req, result_tx } in task_rx {
|
||||
match send_request(&mut stdin, &mut stdout, req) {
|
||||
Ok(res) => result_tx.send(res).unwrap(),
|
||||
Err(_err) => {
|
||||
|
|
Loading…
Add table
Reference in a new issue