From 3795936edd4f6673f2ce71182f40cc8c4d450c0f Mon Sep 17 00:00:00 2001 From: akshitgautam42 Date: Sun, 12 Nov 2023 16:06:24 +0530 Subject: [PATCH] Exercise 29 --- exercises/06_move_semantics/move_semantics5.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/exercises/06_move_semantics/move_semantics5.rs b/exercises/06_move_semantics/move_semantics5.rs index 267bdccc..d3e9d1a3 100644 --- a/exercises/06_move_semantics/move_semantics5.rs +++ b/exercises/06_move_semantics/move_semantics5.rs @@ -12,8 +12,10 @@ fn main() { let mut x = 100; let y = &mut x; - let z = &mut x; *y += 100; + + let z = &mut x; + *z += 1000; assert_eq!(x, 1200); }