From a0f3a6eaa73b5e8375bc3d2bf002d8915e635622 Mon Sep 17 00:00:00 2001 From: LukeMathWalker <20745048+LukeMathWalker@users.noreply.github.com> Date: Mon, 13 May 2024 20:30:01 +0200 Subject: [PATCH] Fix: `recv` returns an `Option` --- exercises/07_threads/07_ack/tests/insert.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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); -- 2.45.2