Code Room
Code reviewHard
Question
Review this Rust code that mutates a shared list via RefCell.
What a strong answer looks like
Separate real bugs from style. Rank issues by severity, point at the root cause rather than the symptom, and suggest a concrete fix — specific and kind.
Learn the concepts
use std::cell::RefCell;use std::rc::Rc; fn run() { let list = Rc::new(RefCell::new(vec![1, 2, 3])); let b = list.borrow(); let first = b[0]; list.borrow_mut().push(first + 10); println!("{:?}", list.borrow());}Run or narrate your approach, then ask the coach.