1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2025-05-16 07:36:05 +02:00

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.
This commit is contained in:
Nicole L 2025-04-22 07:01:38 -07:00 committed by GitHub
parent 5211436446
commit 3103eba5cd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -8,8 +8,8 @@ An assignment will transfer _ownership_ between variables:
```rust,editable
fn main() {
let s1: String = String::from("Hello!");
let s2: String = s1;
let s1 = String::from("Hello!");
let s2 = s1;
dbg!(s2);
// dbg!(s1);
}