Merge pull request #2015 from ramenhost/fix-move_semantics5

move_semantics5: change to fix misleading compiler error
This commit is contained in:
Mo 2024-07-04 16:25:57 +02:00 committed by GitHub
commit d3cdeed871
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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}");
} }