New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable RuntimeProvider in DoT implementations #1373
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1373 +/- ##
=======================================
Coverage 86.35% 86.35%
=======================================
Files 134 134
Lines 13870 13871 +1
=======================================
+ Hits 11977 11978 +1
Misses 1893 1893 |
b50e7eb
to
f6b5091
Compare
Are you using nightly Rust? |
b6a40ef
to
d751b41
Compare
Oops, my bad. Now that's sorted out. Having to convert between |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This changes looks good in principe, though some of the type aliases look very complex. Does it really make sense to declare a TcpClientStream<AsyncIoTokioAsStd<TokioTlsStream<AsyncIoStdAsTokio<S>>>>
?
In your changes, you changed the import style. I think these changes should be reverted/made to comply with the prevalent style. In the prevalent style, there is no nested grouping of imported items. I can make another pass once this is fixed.
crates/rustls/src/tests.rs
Outdated
@@ -26,9 +26,9 @@ use openssl::x509::*; | |||
use futures_util::stream::StreamExt; | |||
use rustls::Certificate; | |||
use rustls::ClientConfig; | |||
use tokio::runtime::Runtime; | |||
use tokio::{net::TcpStream as TokioTcpStream, runtime::Runtime}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's put this on a separate line, in keeping with the surrounding style.
Well, I don't think anyone would like such a strange type. However, I currently have no idea how to simplify that.
The issue is that each part of this type accepts different |
Ugh, yeah, I guess that's actually necessary. |
I have updated all the styles. |
656bea0
to
1fedd27
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks fine to me. Thanks!
Please note that this would be a breaking change for every TLS implementation crate, as there is an extra type parameter. |
I was surprised that
RuntimeProvider
does not work in DoT, which is not ideal for my application.Most changes of this PR are just playing around with types, almost no changes have been made to the logic.