Skip to content

Instantly share code, notes, and snippets.

@jedisct1
Last active March 23, 2017 16:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jedisct1/2951489b7c11683d0b291f30f68e9871 to your computer and use it in GitHub Desktop.
Save jedisct1/2951489b7c11683d0b291f30f68e9871 to your computer and use it in GitHub Desktop.
x.rs
let (writer, mut reader) = stream.framed(LineCodec).split();
let server = reader.and_then(|x| writer.send(x));
handle.spawn(server);
handle.spawn(server);
^^^^^ the trait `futures::Future` is not implemented for `futures::stream::Then<futures::stream::AndThen<futures::stream::SplitStream<tokio_io::codec::Framed<tokio_core::net::TcpStream, LineCodec>>, [closure@src/main.rs:125:42: 125:60 writer:_], futures::sink::Send<futures::stream::SplitSink<tokio_io::codec::Framed<tokio_core::net::TcpStream, LineCodec>>>>, [closure@src/main.rs:125:67: 125:77], std::result::Result<(), _>>`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment