complete chapter 7
Some checks failed
CI / gravity (push) Has been skipped
CI / build (push) Failing after 14s
CI / is_fresh (push) Successful in 49s
CI / formatter (push) Failing after 17s

This commit is contained in:
2025-05-02 14:11:16 +05:30
parent 4fbee2d894
commit b044878fe8
11 changed files with 90 additions and 31 deletions

View File

@@ -28,13 +28,13 @@ impl TicketStore {
description: ticket.description,
status: Status::ToDo,
};
todo!();
self.tickets.insert(id, Arc::new(Mutex::new(ticket)));
id
}
// The `get` method should return a handle to the ticket
// which allows the caller to either read or modify the ticket.
pub fn get(&self, id: TicketId) -> Option<todo!()> {
todo!()
pub fn get(&self, id: TicketId) -> Option<Arc<Mutex<Ticket>>> {
self.tickets.get(&id).cloned()
}
}