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

refactor: error message for missing token and cleanups #168

Merged
merged 6 commits into from
Dec 29, 2023

Conversation

codeesura
Copy link
Contributor

Summary

This pull request introduces a refactoring to the fetch_bridge_multiaddrs function in codebase, specifically targeting the way TCP protocol filtering is handled.

Changes

Previously, the function utilized a .filter() and .map() combination to process Multiaddr elements, which could include TCP protocols. This approach was functional but not optimal in terms of clarity and efficiency. To enhance the code quality, I've refactored this segment using .filter_map(), which combines filtering and mapping in a more concise manner.

Copy link
Member

@zvolin zvolin left a comment

Choose a reason for hiding this comment

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

Hey

This approach was functional but not optimal in terms of clarity and efficiency.

The efficiency here is equal, as the changes are noop. In terms of clarity tho, we rather prefer what we had in places I mentioned.

We're happy to merge the rest of changes tho if you'd like to remove those two

cli/src/native.rs Outdated Show resolved Hide resolved
cli/src/server.rs Outdated Show resolved Hide resolved
@codeesura codeesura requested a review from zvolin December 28, 2023 19:38
@zvolin zvolin changed the title refactor: streamline TCP protocol filtering refactor: error message for missing token and cleanups Dec 29, 2023
Copy link
Member

@zvolin zvolin left a comment

Choose a reason for hiding this comment

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

Looks good, thanks 👍 the CI issue is likely a new clippy finding that came with new toolchain

@zvolin zvolin enabled auto-merge (squash) December 29, 2023 10:28
@zvolin
Copy link
Member

zvolin commented Dec 29, 2023

It looks like there is another issue, we have a requirement for commits to be signed. Would you mind signing the commits you made?

auto-merge was automatically disabled December 29, 2023 14:07

Head branch was pushed to by a user without write access

@codeesura
Copy link
Contributor Author

It looks like there is another issue, we have a requirement for commits to be signed. Would you mind signing the commits you made?

Signed the commits and updated. Please check. Thank you.

@fl0rek fl0rek merged commit ccc5b9b into eigerco:main Dec 29, 2023
5 checks passed
@fl0rek
Copy link
Member

fl0rek commented Dec 29, 2023

looking good, thanks @codeesura

@github-actions github-actions bot mentioned this pull request Jan 9, 2024
This was referenced Jan 12, 2024
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.

3 participants