refactor(s2n-quic-dc): use map getter method to replace AsRef for Handshake trait - #2746
Merged
Merged
Conversation
boquan-fang
marked this pull request as ready for review
August 6, 2025 22:11
boquan-fang
requested review from
Mark-Simulacrum,
WesleyRosenblum and
camshaft
August 6, 2025 22:11
camshaft
approved these changes
Aug 7, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Release Summary:
Resolved issues:
related to #2741, and #2744.
Description of changes:
After some review, I decided to not use a
AsReftrait to retrieve thesecret::Mapthat's associated with the client and server tokio builders:s2n-quic/dc/s2n-quic-dc/src/stream/server/tokio.rs
Lines 29 to 31 in b1245b8
s2n-quic/dc/s2n-quic-dc/src/stream/client/tokio.rs
Lines 31 to 39 in b1245b8
Instead, we can just add a
mapmethod to extract thesecrete::Map. Using theAsReftrait is hard to remove in the future and thisHandshaketrait is just a temporary solution to the fact that some methods hasn't been implemented.Call-outs:
Testing:
I did internal integration test for this.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.