diff options
| author | mo khan <mo@mokhan.ca> | 2025-06-03 10:46:38 -0600 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2025-06-03 10:46:38 -0600 |
| commit | 5c6e73bbd59cc3ad2b959b570fa3067bc37a7920 (patch) | |
| tree | b763e185d5793093f879877648d1a548004018ad | |
| parent | f1684e22a7d5be6eb042841bd54ccc7033963dfd (diff) | |
println with debug trait
| -rw-r--r-- | 5.2/src/main.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/5.2/src/main.rs b/5.2/src/main.rs index 105db94..3b4cad5 100644 --- a/5.2/src/main.rs +++ b/5.2/src/main.rs @@ -72,6 +72,7 @@ fn area(dimensions: (u32, u32)) -> u32 { } */ +#[derive(Debug)] struct Rectangle { width: u32, height: u32, @@ -82,6 +83,7 @@ fn main() { width: 30, height: 50, }; + println!("rect1 is {rect1:?}"); println!( "The area of the rectangle is {} square pixels.", area(&rect1) |
