Medium
Using a String after passing it to a function by value
What happens when this code is compiled?
main.rs
fn take_ownership(s: String) {
println!("took: {}", s);
}
fn main() {
let s = String::from("hello");
take_ownership(s);
println!("still have: {}", s);
}1 of 53 in Rust