Add a test, and change umbrella impl...

...to be for Deref<Target=S> where S: Service instead of Deref<Target=Service>.
This commit is contained in:
Tim Kuehn
2016-01-24 17:17:59 -08:00
parent f46df2b07a
commit 68445824af

View File

@@ -198,8 +198,9 @@ macro_rules! rpc {
)*
}
impl<P> Service for P
where P: Send + Sync + ::std::ops::Deref<Target=Service>
impl<P, S> Service for P
where P: Send + Sync + ::std::ops::Deref<Target=S>,
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");