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 Module lookup in the Router trait #802

Closed
Farhad-Shabani opened this issue Aug 1, 2023 · 0 comments · Fixed by #806
Closed

Simplify Module lookup in the Router trait #802

Farhad-Shabani opened this issue Aug 1, 2023 · 0 comments · Fixed by #806
Assignees
Labels
O: decoupling Objective: aims to separate concerns and cause to independent, reusable components
Milestone

Comments

@Farhad-Shabani
Copy link
Member

Summary

There is only one way to implement lookup_module_channel and lookup_module_packet methods within the Router trait. Their main purpose is to extract PortId from ChannelMsg and PacketMsg.
We should consider removing them and, instead, introduce a free mapping function for each of the ChannelMsg and PacketMsg that extracts PortId. Following this, the existing method lookup_module_by_port can be used everywhere for subsequent module lookup operation.

@Farhad-Shabani Farhad-Shabani added the O: decoupling Objective: aims to separate concerns and cause to independent, reusable components label Aug 1, 2023
@Farhad-Shabani Farhad-Shabani self-assigned this Aug 4, 2023
@Farhad-Shabani Farhad-Shabani added this to the v0.44.0 milestone Aug 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
O: decoupling Objective: aims to separate concerns and cause to independent, reusable components
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant