LYR-SEM0217
'clone()' of a value a copy makes whole
clone() is called on a number, a bool, a char, a string, or a struct or an enum made of only such.
Explanation
An assignment copies such a value whole, and a string never changes: the copy is a value of its own, and clone() makes nothing a copy does not.
Use the value itself.
Wrong
fn main(): void {
let name = "lyric";
let copy = name.clone();
let _ = copy;
}
Right
fn main(): void {
let name = "lyric";
let copy = name;
let _ = copy;
}