Skip to content

Commit d3cdeed

Browse files
authored
Merge pull request #2015 from ramenhost/fix-move_semantics5
move_semantics5: change to fix misleading compiler error
2 parents 30d5b7d + 0524632 commit d3cdeed

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

exercises/06_move_semantics/move_semantics5.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ fn get_char(data: String) -> char {
1818

1919
// Should take ownership
2020
fn string_uppercase(mut data: &String) {
21-
data = &data.to_uppercase();
21+
data = data.to_uppercase();
2222

2323
println!("{data}");
2424
}

0 commit comments

Comments
 (0)