0

I'm getting the following error:

the trait `std::slice::SliceIndex<[Pokemon]>` is not implemented for `&usize`

I'm trying to index my vector with a size parsed from user input.

Shepmaster
  • 388,571
  • 95
  • 1,107
  • 1,366
Chris Karani
  • 414
  • 5
  • 14
  • 1
    *Questions seeking debugging help ("why isn't this code working?") must include the desired behavior, a specific problem or error and the shortest code necessary to reproduce it in the question itself* – Shepmaster Dec 09 '18 at 16:12
  • 1
    TL;DR the duplicate: `*my_reference`. You may wish to go back and re-read [*The Rust Programming Language*](https://doc.rust-lang.org/book/ch04-02-references-and-borrowing.html) as it covers introductory topics like this. – Shepmaster Dec 09 '18 at 16:22

0 Answers0