Fulfill TODO#102
Conversation
mooori
left a comment
There was a problem hiding this comment.
Thanks @SteMak, LGTM!
In such a way, some unnecessary actions are performed
(.iter().skip(0).take(1).cloned().collect()).
However, the code looks clearer.
The TODO was written before get_bearers was implemented. It wasn’t known then that it would perform these unnecessary actions. In reasonable use cases, init_super_admin is called when there are no super-admins. Then I think the overhead of get_bearers is negligible and we can merge this PR to clean up the code.
The CI failure seems to be unrelated to the changes made in this PR. We are investigating it.
CI is passing now after an issue with its setup has been resolved. |
The ToDo refers to PR #12.
As it was merged, the code can be updated there.
In such a way, some unnecessary actions are performed (
.iter().skip(0).take(1).cloned().collect()).However, the code looks clearer.
The change does not break any tests.
If the PR would not be accepted, the ToDo should be reworked or removed.