From 166c775e8fe0575e657b4e1bf2598aa225095fb5 Mon Sep 17 00:00:00 2001 From: Yaroslav Klymko Date: Mon, 4 Mar 2024 20:10:41 +0100 Subject: [PATCH] Update main.rs improve listing-05-15/src/main.rs --- .../listing-05-15/src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/listings/ch05-using-structs-to-structure-related-data/listing-05-15/src/main.rs b/listings/ch05-using-structs-to-structure-related-data/listing-05-15/src/main.rs index e6a32723f1..9732bb3bed 100644 --- a/listings/ch05-using-structs-to-structure-related-data/listing-05-15/src/main.rs +++ b/listings/ch05-using-structs-to-structure-related-data/listing-05-15/src/main.rs @@ -11,7 +11,7 @@ impl Rectangle { } fn can_hold(&self, other: &Rectangle) -> bool { - self.width > other.width && self.height > other.height + self.width >= other.width && self.height >= other.height } } // ANCHOR_END: here