Add optional native-tls support, clear up warnings for flag configurations

This commit is contained in:
k3d3
2020-04-13 22:03:53 -04:00
committed by Martin Algesten
parent 8a05241eac
commit 9f7f712dde
8 changed files with 65 additions and 15 deletions

View File

@@ -29,12 +29,12 @@ impl ConnectionPool {
self.recycle.remove(&PoolKey::new(url))
}
#[cfg(test)]
#[cfg(all(test, any(feature = "tls", feature = "native-tls")))]
pub fn len(&self) -> usize {
self.recycle.len()
}
#[cfg(test)]
#[cfg(all(test, any(feature = "tls", feature = "native-tls")))]
pub fn get(&self, hostname: &str, port: u16) -> Option<&Stream> {
let key = PoolKey {
hostname: hostname.into(),