Skip to content

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