Skip to main content
Journey Uncommon Logo
JourneyUncommon
easyRuststructs and tuple structsSingle-choice MCQ

What is the purpose of the struct update syntax `..` shown here?

struct P { x: i32, y: i32 } let base = P { x: 9, y: 8 }; let p = P { x: 1, ..base };