trpl-zh-cn/listings/ch05-using-structs-to-structure-related-data/output-only-01-debug/src/main.rs
2022-02-06 16:43:51 +08:00

14 lines
182 B
Rust
Executable File

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