Skip to content

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

@stonylohr

Description

@stonylohr

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions