From 3bc969cad8bfab664b4bc9f2832212d41752d649 Mon Sep 17 00:00:00 2001 From: Tyler Turk Date: Thu, 20 May 2021 12:39:51 -0500 Subject: [PATCH] Update structs.md It seems like the variables here are flipped. When implementing the rectangle area method, I noticed that my area should be 0 and discovered this. --- src/custom_types/structs.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/custom_types/structs.md b/src/custom_types/structs.md index 227a261fb5..90dac52b6f 100644 --- a/src/custom_types/structs.md +++ b/src/custom_types/structs.md @@ -59,7 +59,7 @@ fn main() { println!("second point: ({}, {})", bottom_right.x, bottom_right.y); // Destructure the point using a `let` binding - let Point { x: top_edge, y: left_edge } = point; + let Point { x: left_edge, y: top_edge } = point; let _rectangle = Rectangle { // struct instantiation is an expression too