Quiz · Structs · lesson 7 of 8
Quiz — {:?} without derive
What happens when this program is built and run?
struct P {
x: i32,
}
fn main() {
let p = P { x: 1 };
println!("{} {:?}", p.x, p);
}What happens when this program is built and run?
struct P {
x: i32,
}
fn main() {
let p = P { x: 1 };
println!("{} {:?}", p.x, p);
}