Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unused Index(Mut) impls on AST types #11903

Merged
merged 2 commits into from Feb 21, 2024

Commits on Feb 19, 2024

  1. Remove unused Index(Mut) impls on AST types

    Both `Block` and `Pipeline` had `Index`/`IndexMut` implementations to
    access their elements, that are currently unused.
    Explicit helpers or iteration would generally be preferred anyways but
    in the current state the inner containers are `pub` and are liberally
    used. (Sometimes with potentially panicking indexing or also iteration)
    
    As it is potentially unclear what the meaning of the element from a
    block or pipeline queried by a usize is, let's remove it entirely until
    we come up with a better API.
    sholderbach committed Feb 19, 2024
    Configuration menu
    Copy the full SHA
    b6c9e2e View commit details
    Browse the repository at this point in the history
  2. Fix the affected tests

    I forgot to check if there are references in the tests.
    
    This certainly makes it more verbose.
    sholderbach committed Feb 19, 2024
    Configuration menu
    Copy the full SHA
    c035220 View commit details
    Browse the repository at this point in the history