We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
let v = vec!["a","b"]; let _: Vec<_> = v.get(0..1).unwrap().to_vec(); // ^^^^^^^^^^^^^^^^^^^^ help: try this: `&v[0..1]`
The suggestion changes the result to &Vec instead of Vec, so it doesn't compile. It has to be v[0..1] or (&v[0..1]) instead.
&Vec
Vec
v[0..1]
(&v[0..1])