From: LukeMathWalker <20745048+LukeMathWalker@users.noreply.github.com> Date: Mon, 13 May 2024 18:30:01 +0000 (+0200) Subject: Fix: `recv` returns an `Option` X-Git-Url: http://git.euphorik.ch/index.cgi?a=commitdiff_plain;h=a0f3a6eaa73b5e8375bc3d2bf002d8915e635622;p=rust_exercises.git Fix: `recv` returns an `Option` --- diff --git a/exercises/07_threads/07_ack/tests/insert.rs b/exercises/07_threads/07_ack/tests/insert.rs index 6e249ba..85eb143 100644 --- a/exercises/07_threads/07_ack/tests/insert.rs +++ b/exercises/07_threads/07_ack/tests/insert.rs @@ -34,7 +34,10 @@ fn insert_works() { .send(command) .expect("Did you actually spawn a thread? The channel is closed!"); - let ticket: Ticket = response_receiver.recv().expect("No response received!"); + let ticket: Ticket = response_receiver + .recv() + .expect("No response received!") + .unwrap(); assert_eq!(ticket_id, ticket.id); assert_eq!(ticket.status, Status::ToDo); assert_eq!(ticket.title, draft.title);