book/listings/ch05-using-structs-to-struc.../listing-05-12/src/main.rs

15 lines
197 B
Rust

#[derive(Debug)]
struct Rectangle {
width: u32,
height: u32,
}
fn main() {
let rect1 = Rectangle {
width: 30,
height: 50,
};
println!("rect1 is {rect1:?}");
}