chore: fix some typos (#984)
Signed-off-by: cuishuang <imcusg@gmail.com>
This commit is contained in:
+1
-1
@@ -72,7 +72,7 @@
|
||||
|
||||
* **build:** Correctly convert `Empty` to `()` ([#734](https://github.com/hyperium/tonic/issues/734)) ([ff6a690](https://github.com/hyperium/tonic/commit/ff6a690cec9daca33984cabea66f9d370ac63462))
|
||||
* **tonic:** fix extensions disappearing during streaming requests ([5c1bb90](https://github.com/hyperium/tonic/commit/5c1bb90ce82ecf90843a7c959edd7ef8fc280f62)), closes [#770](https://github.com/hyperium/tonic/issues/770)
|
||||
* **tonic:** Status code to set correct source on unkown error ([#799](https://github.com/hyperium/tonic/issues/799)) ([4054d61](https://github.com/hyperium/tonic/commit/4054d61e14b9794a72b48de1a051c26129ec36b1))
|
||||
* **tonic:** Status code to set correct source on unknown error ([#799](https://github.com/hyperium/tonic/issues/799)) ([4054d61](https://github.com/hyperium/tonic/commit/4054d61e14b9794a72b48de1a051c26129ec36b1))
|
||||
* **transport:** AddOrigin panic on invalid uri ([#801](https://github.com/hyperium/tonic/issues/801)) ([3ab00f3](https://github.com/hyperium/tonic/commit/3ab00f304dd204fccf00d1995e635fa6b2f8503b))
|
||||
* **transport:** Correctly map hyper errors ([#629](https://github.com/hyperium/tonic/issues/629)) ([4947b07](https://github.com/hyperium/tonic/commit/4947b076f5b0b5149ee7f6144515535b85f65db5))
|
||||
* **tonic:** compression: handle compression flag but no header (#763)
|
||||
|
||||
@@ -27,7 +27,7 @@ async fn streaming_echo(client: &mut EchoClient<Channel>, num: usize) {
|
||||
// stream is infinite - take just 5 elements and then disconnect
|
||||
let mut stream = stream.take(num);
|
||||
while let Some(item) = stream.next().await {
|
||||
println!("\trecived: {}", item.unwrap().message);
|
||||
println!("\treceived: {}", item.unwrap().message);
|
||||
}
|
||||
// stream is droped here and the disconnect info is send to server
|
||||
}
|
||||
@@ -42,9 +42,9 @@ async fn bidirectional_streaming_echo(client: &mut EchoClient<Channel>, num: usi
|
||||
|
||||
let mut resp_stream = response.into_inner();
|
||||
|
||||
while let Some(recived) = resp_stream.next().await {
|
||||
let recived = recived.unwrap();
|
||||
println!("\trecived message: `{}`", recived.message);
|
||||
while let Some(received) = resp_stream.next().await {
|
||||
let received = received.unwrap();
|
||||
println!("\treceived message: `{}`", received.message);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,9 +58,9 @@ async fn bidirectional_streaming_echo_throttle(client: &mut EchoClient<Channel>,
|
||||
|
||||
let mut resp_stream = response.into_inner();
|
||||
|
||||
while let Some(recived) = resp_stream.next().await {
|
||||
let recived = recived.unwrap();
|
||||
println!("\trecived message: `{}`", recived.message);
|
||||
while let Some(received) = resp_stream.next().await {
|
||||
let received = received.unwrap();
|
||||
println!("\treceived message: `{}`", received.message);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -72,13 +72,13 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
streaming_echo(&mut client, 5).await;
|
||||
tokio::time::sleep(Duration::from_secs(1)).await; //do not mess server println functions
|
||||
|
||||
// Echo stream that sends 17 requests then gracefull end that conection
|
||||
// Echo stream that sends 17 requests then graceful end that connection
|
||||
println!("\r\nBidirectional stream echo:");
|
||||
bidirectional_streaming_echo(&mut client, 17).await;
|
||||
|
||||
// Echo stream that sends up to `usize::MAX` requets. One request each 2s.
|
||||
// Exiting client with CTRL+C demostrate how to distinguise broken pipe from
|
||||
//gracefull client disconnection (above example) on the server side.
|
||||
// Exiting client with CTRL+C demonstrate how to distinguish broken pipe from
|
||||
//graceful client disconnection (above example) on the server side.
|
||||
println!("\r\nBidirectional stream echo (kill client with CTLR+C):");
|
||||
bidirectional_streaming_echo_throttle(&mut client, Duration::from_secs(2)).await;
|
||||
|
||||
|
||||
@@ -107,7 +107,7 @@ impl Channel {
|
||||
|
||||
/// Balance a list of [`Endpoint`]'s.
|
||||
///
|
||||
/// This creates a [`Channel`] that will load balance accross all the
|
||||
/// This creates a [`Channel`] that will load balance across all the
|
||||
/// provided endpoints.
|
||||
pub fn balance_list(list: impl Iterator<Item = Endpoint>) -> Self {
|
||||
let (channel, tx) = Self::balance_channel(DEFAULT_BUFFER_SIZE);
|
||||
|
||||
Reference in New Issue
Block a user