georust / geographiclib-rs

A port of geographiclib in Rust.
MIT License
40 stars 9 forks source link

favor type usize for variables that are primarily an array index #12

Closed stonylohr closed 8 months ago

stonylohr commented 4 years ago

Type usize is required for the index into an array or slice. It is generally preferable to go ahead and use this type from the outset for variables for which this is the primary purpose, to reduce the need for casting later. Unless there is a specific reason to do otherwise, of course.

Examples of places that might benefit from this change... geodesic: GEODESIC_ORDER geomath::_A1m1f: geodesic_order geomath::_C1f: geodesic_order, m, o geomath::_A2m1f: m geomath::_C2f: o, m

michaelkirk commented 4 years ago

SGTM

valarauca commented 8 months ago

Fixed in https://github.com/georust/geographiclib-rs/pull/58

michaelkirk commented 8 months ago

In #57