Exerpad
🔥0
0 XP
Lv.1 Beginner
Log In

Clone a String

Create a String "Pixel", then clone it into a second variable. Print both on separate lines.

Expected output:

text
Original: Pixel
Clone: Pixel

Hints:

  • Use String::from("Pixel") to create the string
  • Use .clone() to make a copy
  • Print each with println!
rust
fn main() {
}