Skip to main content
Journey Uncommon Logo
JourneyUncommon
easyRustownership and moveSingle-choice MCQ

A function takes a value by value: `fn takes(s: String)`. You want to call it but keep using your String afterward. What is the standard way?

fn takes(s: String) { /* ... */ } fn main() { let s = String::from("hi"); takes(/* ? */); println!("{}", s); }