diff --git a/src/h1/dispatcher.rs b/src/h1/dispatcher.rs index 06d4312a4..6a1762747 100644 --- a/src/h1/dispatcher.rs +++ b/src/h1/dispatcher.rs @@ -599,7 +599,9 @@ mod tests { let mut h1 = Dispatcher::new( buf, ServiceConfig::default(), - (|req| ok::<_, Error>(Response::Ok().finish())).into_service(), + CloneableService::new( + (|req| ok::<_, Error>(Response::Ok().finish())).into_service(), + ), ); assert!(h1.poll().is_ok()); assert!(h1.poll().is_ok());