mirror of
https://github.com/KaiserY/trpl-zh-cn
synced 2025-02-24 21:32:15 +08:00
15 lines
199 B
Rust
Executable File
15 lines
199 B
Rust
Executable File
#[derive(Debug)]
|
|
struct Rectangle {
|
|
width: u32,
|
|
height: u32,
|
|
}
|
|
|
|
fn main() {
|
|
let rect1 = Rectangle {
|
|
width: 30,
|
|
height: 50,
|
|
};
|
|
|
|
println!("rect1 is {:?}", rect1);
|
|
}
|