Slug: own-move-04 · Paired reading: Chapter 5
Prompt
Given struct Pair { a: String, b: String }, implement
fn take_a(p: Pair) -> (String, Pair) that returns field a and a Pair
whose a is empty and whose b is the original b.
Rust angle
Partial moves leave the rest of the struct uninitialized for moved fields — rebuild explicitly.