Fix up cargo test --no-default-features. (#75)
Adds some feature guards, and removes an unnecessary feature guard around a call to connect_https (there's an implementation available for non-TLS that returns UnknownScheme). Also, remove unnecessary agent.state() method that was only available in TLS builds. The state field is directly accessible within the crate, and can be used in both TLS and non-TLS builds. Co-authored-by: Martin Algesten <martin@algesten.se>
This commit is contained in:
committed by
GitHub
parent
e366c8fcd0
commit
7adbd57308
@@ -99,7 +99,7 @@ fn connection_reuse() {
|
||||
resp.into_reader().read_to_end(&mut buf).unwrap();
|
||||
|
||||
{
|
||||
let mut guard_state = agent.state().lock().unwrap();
|
||||
let mut guard_state = agent.state.lock().unwrap();
|
||||
let mut state = guard_state.take().unwrap();
|
||||
assert!(state.pool().len() > 0);
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ fn agent_pool() {
|
||||
assert_eq!(len, 1000);
|
||||
|
||||
{
|
||||
let mut lock = agent.state().lock().unwrap();
|
||||
let mut lock = agent.state.lock().unwrap();
|
||||
let state = lock.as_mut().unwrap();
|
||||
let pool = state.pool();
|
||||
assert_eq!(pool.len(), 1);
|
||||
|
||||
Reference in New Issue
Block a user