From 04c4e55b377dc4470c65d5fbf33c945f7337714a Mon Sep 17 00:00:00 2001 From: LukeMathWalker <20745048+LukeMathWalker@users.noreply.github.com> Date: Mon, 13 May 2024 21:00:43 +0200 Subject: [PATCH] Fix tests --- exercises/07_threads/11_locks/tests/check.rs | 4 ++-- exercises/07_threads/12_rw_lock/tests/check.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/exercises/07_threads/11_locks/tests/check.rs b/exercises/07_threads/11_locks/tests/check.rs index dd88073..19939b1 100644 --- a/exercises/07_threads/11_locks/tests/check.rs +++ b/exercises/07_threads/11_locks/tests/check.rs @@ -13,13 +13,13 @@ fn works() { let ticket = client.get(ticket_id).unwrap().unwrap(); { - let ticket = ticket.lock().unwrap(); + let mut ticket = ticket.lock().unwrap(); assert_eq!(ticket_id, ticket.id); assert_eq!(ticket.status, Status::ToDo); assert_eq!(ticket.title, draft.title); assert_eq!(ticket.description, draft.description); - *ticket.status = Status::InProgress; + ticket.status = Status::InProgress; } let ticket = client.get(ticket_id).unwrap().unwrap(); diff --git a/exercises/07_threads/12_rw_lock/tests/check.rs b/exercises/07_threads/12_rw_lock/tests/check.rs index bda9495..21fdce5 100644 --- a/exercises/07_threads/12_rw_lock/tests/check.rs +++ b/exercises/07_threads/12_rw_lock/tests/check.rs @@ -25,7 +25,7 @@ fn works() { let ticket = client.get(ticket_id).unwrap().unwrap(); { - let ticket = ticket.write().unwrap(); - *ticket.status = Status::InProgress; + let mut ticket = ticket.write().unwrap(); + ticket.status = Status::InProgress; } } -- 2.45.2