correction
This commit is contained in:
parent
029fbbe9e6
commit
95d5ab656a
1 changed files with 1 additions and 1 deletions
|
@ -4,7 +4,7 @@ fn main()
|
||||||
|
|
||||||
//mutable because we will clean it later.
|
//mutable because we will clean it later.
|
||||||
let mut s = String::from("Yellow Duck");
|
let mut s = String::from("Yellow Duck");
|
||||||
//it's not &String, it's literal thanks to slice
|
//it's not &String, it's literal reference thanks to slice
|
||||||
let firts = firts_world(&s[..]);
|
let firts = firts_world(&s[..]);
|
||||||
println!("{}", firts);
|
println!("{}", firts);
|
||||||
s.clear();
|
s.clear();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue