Warm-up: Three Review Calls
From here on we assume yesterday’s vocabulary. Three snippets. For each one: name the smell, the principle behind it, and the one-sentence prompt you’d send.
1
let cfg = config.clone();
apply(&cfg);
2
pub fn parse(s: &str) -> Config {
let port = s.trim().parse().unwrap();
Config { port }
}
3
// `status: String`, and this comparison appears at four call sites:
if status == "ready" {
start_capture();
}