#Cannot index into a value of type `ArrayWrapper<S>`

3 messages · Page 1 of 1 (latest)

fresh hamlet
#

I think you meant to do

&self.array[0..self.size]

You were trying to use the indexing operation [] on your custom type ArrayWrapper and the compiler doesn't know what it should do with that.

If you did intend to want to support the indexing operator for your custom type though, you can implement the Index trait

#

As for the second error, you have a semi colon at the end of that line which you should remove

polar umbra
#

Ah!!!
Fixed it!!