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

Incremental routing code refactoring (1) #2

Open
wants to merge 13 commits into
base: routing-refactor
Choose a base branch
from

Conversation

jerry73204
Copy link

This PR pushes a series of internal code refactoring based on Oliver's routing-refactor branch.

  • Replace full qualified paths with "use"s. For example, std::borrow::Cow is rewritten as Cow for readability.
  • Some macros are changed to functions. For example, send_to_first and send_to_many`. It reduces the macro processing a bit.
  • Use NodeId, FaceId and NodeIndex instead of usize for index numbers. It improves readability and avoids accidental misusage.
  • The Clone impls are removed from the types that are not intended to be cloned, such as Face. They are wrapped to Arc instead.
  • Some function generics are removed from internal code, such as Face: Borrow<Arc<FaceState>>.
  • The type of the field Node::links is changed from Vec to HashSet to speed up .contains() search.

More incremental changes will be pushed later. Before it happens, we'd make sure these changes are correctly done.

@wyfo
Copy link

wyfo commented Jun 18, 2024

@OlivierHecart is this PR completely outdated so we can close it?

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