Skip to content

Conversation

@dfawley
Copy link
Collaborator

@dfawley dfawley commented Nov 4, 2025

This is an old change that I found in my client that never got pushed upstream, but is worth having.

Upgrading weak to owned before performing these operations is more expensive. Just using the pointer is simpler and quicker and equally valid.

Promoting to Arc<dyn Subchannel> before performing these operations is
more expensive.  Just using the pointer is simpler and quicker.
return strong.dyn_hash(&mut Box::new(state as &mut dyn Hasher));
}
panic!("WeakSubchannel is not valid");
(self.0.as_ptr() as *const () as usize).hash(state);
Copy link
Member

Choose a reason for hiding this comment

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

this feels really weird but I guess its okay lol

@dfawley dfawley merged commit 8921a2d into hyperium:master Nov 6, 2025
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants