feat(client): update construction of Clients
- `Client::new()` no longer needs a `Handle`, and instead makes use of tokio's implicit default. - Changed `Client::configure()` to `Client::builder()`. - `Builder` is a by-ref builder, since all configuration is now cloneable pieces. BREAKING CHANGE: `Client:new(&handle)` and `Client::configure()` are now `Client::new()` and `Client::builder()`.
This commit is contained in:
@@ -503,11 +503,12 @@ mod tests {
|
||||
|
||||
#[test]
|
||||
fn test_pool_timer_removes_expired() {
|
||||
use std::sync::Arc;
|
||||
let runtime = ::tokio::runtime::Runtime::new().unwrap();
|
||||
let pool = Pool::new(true, Some(Duration::from_millis(100)));
|
||||
|
||||
let executor = runtime.executor();
|
||||
pool.spawn_expired_interval(&Exec::new(executor));
|
||||
pool.spawn_expired_interval(&Exec::Executor(Arc::new(executor)));
|
||||
let key = Arc::new("foo".to_string());
|
||||
|
||||
pool.pooled(key.clone(), 41);
|
||||
|
||||
Reference in New Issue
Block a user