Commit 5c6e73b

mo khan <mo@mokhan.ca>
2025-06-03 16:46:38
println with debug trait
1 parent f1684e2
Changed files (1)
5.2
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)