diff --git a/solutions/ownership/ownership.md b/solutions/ownership/ownership.md index 3c3f06b..1237fc0 100644 --- a/solutions/ownership/ownership.md +++ b/solutions/ownership/ownership.md @@ -23,11 +23,10 @@ fn main() { println!("{},{}",x,y); } ``` - ```rust fn main() { - let x = 10; - let y = x; + let x = String::from("hello, world"); + let y = x.as_str(); println!("{},{}",x,y); } ```