Skip to content

Commit 3103eba

Browse files
authored
Remove type annotations in move.md (#2711)
At this point I don't think we need the type annotation, and I think the example is a bit clearer without them, so I usually delete these as I'm explaining in class.
1 parent 5211436 commit 3103eba

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/memory-management/move.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ An assignment will transfer _ownership_ between variables:
88

99
```rust,editable
1010
fn main() {
11-
let s1: String = String::from("Hello!");
12-
let s2: String = s1;
11+
let s1 = String::from("Hello!");
12+
let s2 = s1;
1313
dbg!(s2);
1414
// dbg!(s1);
1515
}

0 commit comments

Comments
 (0)