Skip to content

Commit

Permalink
Warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
stepancheg committed May 15, 2017
1 parent 83edc60 commit 70b7e4d
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions tests/simple.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ mod test_misc;
use std::sync::Arc;

use futures::future::*;
use futures::stream;
use futures::Sink;
use futures::stream::Stream;

use grpc::*;
Expand Down Expand Up @@ -172,13 +172,13 @@ impl TesterClientStreaming {
}
}

fn call(&self) -> (stream::Sender<String, GrpcError>, GrpcFutureSend<String>) {
let (tx, rx) = stream::channel();
fn call(&self) -> (futures::sync::mpsc::Sender<String>, GrpcFutureSend<String>) {
let (tx, rx) = futures::sync::mpsc::channel(0);
(
tx,
self.client.call_client_streaming(
GrpcRequestOptions::new(),
GrpcStreamingRequest::new(rx),
GrpcStreamingRequest::new(rx.map_err(|()| unreachable!())),
string_string_method(&self.name, GrpcStreaming::ClientStreaming)).drop_metadata(),
)
}
Expand Down Expand Up @@ -258,9 +258,9 @@ fn client_streaming() {
});

let (tx, result) = tester.call();
let tx = tx.send(Ok("aa".to_owned())).wait().ok().expect("aa");
let tx = tx.send(Ok("bb".to_owned())).wait().ok().expect("bb");
let tx = tx.send(Ok("cc".to_owned())).wait().ok().expect("cc");
let tx = tx.send("aa".to_owned()).wait().ok().expect("aa");
let tx = tx.send("bb".to_owned()).wait().ok().expect("bb");
let tx = tx.send("cc".to_owned()).wait().ok().expect("cc");
drop(tx);

assert_eq!("aabbcc", result.wait().unwrap());
Expand Down

0 comments on commit 70b7e4d

Please sign in to comment.