Skip to content

Feature request: .values_mut_range(idx..) #103

Closed
@Centril

Description

@Centril

I was hacking on the compiler and I wrote:

                    // We've rejected overlap in each product in the sum.
                    // Now we must account for the possibility that or-pattern is a factor
                    // in a product. A basic case to reject here is `(V1(a) | V2(a), a)`.
                    let last_id = *prod_ids.last().unwrap();
                    bindings.values_mut().skip(len_before).for_each(|val| *val = last_id);

which is nice.

Maybe bindings.values_mut_range(len_before..).for_each(..) would be nicer?

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