Skip to content

Conversation

@isabelatkinson
Copy link
Contributor

@isabelatkinson isabelatkinson commented Dec 2, 2025

@@ -33,40 +36,129 @@ pub(crate) enum AsyncStream {
Tcp(TcpStream),

/// A TLS connection over TCP.
Tls(TlsStream),
Tls(TlsStream<TcpStream>),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I used concrete types in the TLS variants rather than a unified one with a generic bound because doing so would propagate generics to every type that uses a connection.

@isabelatkinson isabelatkinson marked this pull request as ready for review December 4, 2025 16:23
@isabelatkinson isabelatkinson requested a review from a team as a code owner December 4, 2025 16:23
/// Dummy struct for internal use.
#[cfg(not(feature = "socks5-proxy"))]
#[derive(Clone, Debug)]
pub(crate) struct Socks5Proxy;
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm guessing this is to avoid having to annotate every single place that just passes one of these around with #[cfg(feature = "socks5-proxy")] - handy. Going to remember this technique.

@isabelatkinson isabelatkinson merged commit 7b9a2d6 into mongodb:main Dec 9, 2025
21 of 23 checks passed
@isabelatkinson isabelatkinson deleted the socks5 branch December 9, 2025 17:17
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