Make library panic even without SSL

This commit is contained in:
Yash Karandikar 2021-12-06 11:19:07 -06:00
parent 4134cf85ff
commit fa468f3bcd

View file

@ -80,9 +80,9 @@ impl Client {
/// # Errors
/// Returns error if the client could not connect to the host.
/// # Panics
/// Panics if the client can't connect to the host.
/// Panics if the client can't connect to the given host.
pub fn new(config: Config) -> Result<Self, Error> {
let stream = TcpStream::connect(format!("{}:{}", config.host, config.port))?;
let stream = TcpStream::connect(format!("{}:{}", config.host, config.port)).unwrap();
#[cfg(feature = "tls")]
let sslstream: native_tls::TlsStream<TcpStream>;