Closed achanda closed 9 years ago
As mentioned elsewhere, I prefer to simply make get panic on out of bounds. Then the code using it remains clean and readable. Out of bounds is always a bug and should panic.
On Tue, Aug 4, 2015 at 3:13 PM, Abhishek Chanda notifications@github.com wrote:
Use of usafe code should be avoided as much as possible
You can view, comment on, or merge this pull request online at:
https://github.com/indigits/scirust/pull/18 Commit Summary
- Unwrap the result from Option whenever possible
File Changes
- M src/linalg/det.rs https://github.com/indigits/scirust/pull/18/files#diff-0 (8)
- M src/linalg/inverse.rs https://github.com/indigits/scirust/pull/18/files#diff-1 (14)
- M src/linalg/linear_system.rs https://github.com/indigits/scirust/pull/18/files#diff-2 (26)
- M src/linalg/lu.rs https://github.com/indigits/scirust/pull/18/files#diff-3 (28)
- M src/linalg/rank.rs https://github.com/indigits/scirust/pull/18/files#diff-4 (4)
- M src/linalg/singularity.rs https://github.com/indigits/scirust/pull/18/files#diff-5 (4)
- M src/stat/moments/matrix_moments.rs https://github.com/indigits/scirust/pull/18/files#diff-6 (6)
Patch Links:
— Reply to this email directly or view it on GitHub https://github.com/indigits/scirust/pull/18.
Daniel Vainsencher
Shape::get() needs to be updated separately to return T and panic()! internally.
Use of usafe code should be avoided as much as possible