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

Simplify Operator.Role #37

Merged
merged 3 commits into from
Mar 18, 2023
Merged

Simplify Operator.Role #37

merged 3 commits into from
Mar 18, 2023

Conversation

stnokott
Copy link
Contributor

Simplifying Operator.Role to panic when unable to determine team role for an operator instead of returning an error.
This is possible since we have a test in place verifying that each operator has a role assigned.
The only scenario where the function can panic if it is called on unitialized an Operator (with value 0).
Since we only use Operator.Role internally, we can assure this doesn't happen.

While at it, I also added ordering for the source code of operator roles in 42c5f9e. I was irritated that the generation of the operator roles map wasn't deterministic, making it hard to git diff the changes, i.e. when a new operator is added.
This is now possible.

@stnokott stnokott marked this pull request as ready for review March 17, 2023 10:04
@redraskal
Copy link
Owner

Good idea on sorting the map! I noticed this as well

@redraskal redraskal merged commit 02f9437 into redraskal:main Mar 18, 2023
@stnokott stnokott deleted the simplify-role branch March 18, 2023 00:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants