The current return type is Result<&T, Error> which is two words long. It should be possible to change it to Result<&T, error::OutOfBounds> where OutOfBounds is a unit struct, this would reduce the size of the return type to 1 word (because &T is a non-null pointer).
Error should implement FromError<OutOfBounds> to keep the try! macro working.
The current return type is
Result<&T, Error>
which is two words long. It should be possible to change it toResult<&T, error::OutOfBounds>
whereOutOfBounds
is a unit struct, this would reduce the size of the return type to 1 word (because&T
is a non-null pointer).Error
should implementFromError<OutOfBounds>
to keep thetry!
macro working.