fix move_semantics5 to change misleading compiler error

This commit is contained in:
Ramkumar 2024-07-04 18:48:09 +05:30
parent 30d5b7db92
commit 0524632199

View file

@ -18,7 +18,7 @@ fn get_char(data: String) -> char {
// Should take ownership // Should take ownership
fn string_uppercase(mut data: &String) { fn string_uppercase(mut data: &String) {
data = &data.to_uppercase(); data = data.to_uppercase();
println!("{data}"); println!("{data}");
} }