Skip to content

refactor: remove dead supported_protocols field from swarm#6265

Open
Forostovec wants to merge 2 commits intolibp2p:masterfrom
Forostovec:refactor/swarm-remove-dead-supported-protocols
Open

refactor: remove dead supported_protocols field from swarm#6265
Forostovec wants to merge 2 commits intolibp2p:masterfrom
Forostovec:refactor/swarm-remove-dead-supported-protocols

Conversation

@Forostovec
Copy link

Description

Before this change Swarm kept a supported_protocols SmallVec that was written on every connection establishment but never read. This caused unnecessary allocations and extra work without affecting behaviour.
This change removes the unused supported_protocols field from Swarm, its initialization in the constructor, and the redundant computation/assignment in handle_pool_event, keeping all connection-level protocol tracking logic unchanged.

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • A changelog entry has been made in the appropriate crates

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