# std.enums: fix \`EnumIndexer\` branch quota · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/ac1e73e249f8ce06bc7c89d2bdc4359b0399236c)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: ac1e73e249f8ce06bc7c89d2bdc4359b0399236c

Requested commit: ac1e73e249f8ce06bc7c89d2bdc4359b0399236c

Commit: ac1e73e249f8ce06bc7c89d2bdc4359b0399236c

Tree: 8fb4f2d0d148b6da972585034407e9e698039817

Author: mlugg

Committer: Matthew Lugg

## Message

```
std.enums: fix `EnumIndexer` branch quota

It's quite silly to have this override which nonetheless makes
assumptions about the input type. Encode the actual complexity of the
sort.

Also, simplify the sorting logic, and fix a bug (grab min and max
*after* the sort, not *before*!)

```

## Parents

- [04d7b491b436f67e51a17ba6fb49de862fa7bb8c](https://git.cafe/gitcafe/zig/commit/04d7b491b436f67e51a17ba6fb49de862fa7bb8c?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/ac1e73e249f8ce06bc7c89d2bdc4359b0399236c?format=markdown)
