From 68445824af9ce70542fc084fae2e82bd58dd564f Mon Sep 17 00:00:00 2001 From: Tim Kuehn Date: Sun, 24 Jan 2016 17:17:59 -0800 Subject: [PATCH] Add a test, and change umbrella impl... ...to be for Deref where S: Service instead of Deref. --- tarpc/src/macros.rs | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/tarpc/src/macros.rs b/tarpc/src/macros.rs index 11a405f..b17b4fd 100644 --- a/tarpc/src/macros.rs +++ b/tarpc/src/macros.rs @@ -198,8 +198,9 @@ macro_rules! rpc { )* } - impl

Service for P - where P: Send + Sync + ::std::ops::Deref + impl Service for P + where P: Send + Sync + ::std::ops::Deref, + S: Service { $( $(#[$attr])* @@ -313,6 +314,15 @@ mod test { } } + #[test] + fn serve_arc_server() { + serve("localhost:0", + ::std::sync::Arc::new(Server), + None) + .unwrap() + .shutdown(); + } + #[test] fn simple_test() { println!("Starting");