Ask your AI Ask your AI to turn this code into a guided bug-finding exercise.
Claude ChatGPT I am reading "A function only reads a Shipment during the call and never stores it. Which parameter best expresses that contract?" on CodeWiki (https://codewiki.com/practice/mcq/rust/ownership/choose-read-only-parameter/).
Context (verbatim from the page):
"""
A function only reads a Shipment during the call and never stores it. Which parameter best expresses that contract?
shipment: &Shipment
shipment: Shipment
shipment: &mut Shipment
shipment: Arc<Mutex<Shipment>>
"""
Introduce three subtle bugs into the example above and let me find them. Reveal each answer only after I have guessed.
Answer in English. Keep code examples in Rust. Where you are unsure, say so.