Box<dyn ReadWrite> for TlsConnector::connect
This commit is contained in:
@@ -356,7 +356,6 @@ pub(crate) fn default_tls_config() -> std::sync::Arc<dyn TlsConnector> {
|
||||
// calls at the top of the crate (`ureq::get` etc).
|
||||
#[cfg(not(feature = "tls"))]
|
||||
pub(crate) fn default_tls_config() -> std::sync::Arc<dyn TlsConnector> {
|
||||
use std::net::TcpStream;
|
||||
use std::sync::Arc;
|
||||
|
||||
struct NoTlsConfig;
|
||||
@@ -365,7 +364,7 @@ pub(crate) fn default_tls_config() -> std::sync::Arc<dyn TlsConnector> {
|
||||
fn connect(
|
||||
&self,
|
||||
_dns_name: &str,
|
||||
_tcp_stream: TcpStream,
|
||||
_io: Box<dyn ReadWrite>,
|
||||
) -> Result<Box<dyn ReadWrite>, crate::error::Error> {
|
||||
Err(ErrorKind::UnknownScheme
|
||||
.msg("cannot make HTTPS request because no TLS backend is configured"))
|
||||
|
||||
Reference in New Issue
Block a user