Skip to content

Fulfill TODO#102

Merged
mooori merged 1 commit into
near:masterfrom
SteMak:master
Mar 31, 2023
Merged

Fulfill TODO#102
mooori merged 1 commit into
near:masterfrom
SteMak:master

Conversation

@SteMak
Copy link
Copy Markdown
Contributor

@SteMak SteMak commented Mar 27, 2023

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.

Copy link
Copy Markdown
Contributor

@mooori mooori left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@mooori mooori requested a review from birchmd March 27, 2023 07:10
@mooori
Copy link
Copy Markdown
Contributor

mooori commented Mar 31, 2023

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.

@mooori mooori merged commit d8904ca into near:master Mar 31, 2023
This was referenced Mar 27, 2026
@github-actions github-actions Bot mentioned this pull request Apr 7, 2026
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.

4 participants