diff --git a/rectangles/src/main.rs b/rectangles/src/main.rs index 62ef9ac..67e0b92 100644 --- a/rectangles/src/main.rs +++ b/rectangles/src/main.rs @@ -1,3 +1,4 @@ +#[derive(Debug)] struct Rectangle { width: u32, height: u32, @@ -9,12 +10,5 @@ fn main() { height: 50, }; - println!( - "The area of the rectangle is {} square pixels.", - area(&rect1) - ); -} - -fn area(rectangle: &Rectangle) -> u32 { - rectangle.width * rectangle.height + println!("rect1 is {rect1:?}"); }