4 lines
129 B
Text
4 lines
129 B
Text
let x = "abc"; // x is of type &str (a borrowed string slice)
|
|
let s = String::from(x);
|
|
// or alternatively
|
|
let s = x.to_owned();
|