mirror of
https://github.com/OMGeeky/tarpc.git
synced 2026-02-23 15:49:54 +01:00
The major breaking change is that Channel::execute no longer internally
spawns RPC handlers, because it is no longer possible to place a Send
bound on the return type of Serve::serve. Instead, Channel::execute
returns a stream of RPC handler futures.
Service authors can reproduce the old behavior by spawning each response
handler (the compiler knows whether or not the futures can be spawned;
it's just that the bounds can't be expressed generically):
channel.execute(server.serve())
.for_each(|rpc| { tokio::spawn(rpc); })
8 lines
232 B
Rust
8 lines
232 B
Rust
#[test]
|
|
fn ui() {
|
|
let t = trybuild::TestCases::new();
|
|
t.compile_fail("tests/compile_fail/*.rs");
|
|
#[cfg(all(feature = "serde-transport", feature = "tcp"))]
|
|
t.compile_fail("tests/compile_fail/serde_transport/*.rs");
|
|
}
|