japaric-archived / linalg.rs

[INACTIVE]
Apache License 2.0
29 stars 1 forks source link

Make the return type of `At::at`/`AtMut::at_mut` "thinner" #26

Closed japaric closed 9 years ago

japaric commented 9 years ago

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.