Skip to content

Commit 6d95473

Browse files
authored
chore: fix some typos (#984)
Signed-off-by: cuishuang <[email protected]>
1 parent 13b55df commit 6d95473

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272

7373
* **build:** Correctly convert `Empty` to `()` ([#734](https://github.com/hyperium/tonic/issues/734)) ([ff6a690](https://github.com/hyperium/tonic/commit/ff6a690cec9daca33984cabea66f9d370ac63462))
7474
* **tonic:** fix extensions disappearing during streaming requests ([5c1bb90](https://github.com/hyperium/tonic/commit/5c1bb90ce82ecf90843a7c959edd7ef8fc280f62)), closes [#770](https://github.com/hyperium/tonic/issues/770)
75-
* **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))
75+
* **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))
7676
* **transport:** AddOrigin panic on invalid uri ([#801](https://github.com/hyperium/tonic/issues/801)) ([3ab00f3](https://github.com/hyperium/tonic/commit/3ab00f304dd204fccf00d1995e635fa6b2f8503b))
7777
* **transport:** Correctly map hyper errors ([#629](https://github.com/hyperium/tonic/issues/629)) ([4947b07](https://github.com/hyperium/tonic/commit/4947b076f5b0b5149ee7f6144515535b85f65db5))
7878
* **tonic:** compression: handle compression flag but no header (#763)

examples/src/streaming/client.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ async fn streaming_echo(client: &mut EchoClient<Channel>, num: usize) {
2727
// stream is infinite - take just 5 elements and then disconnect
2828
let mut stream = stream.take(num);
2929
while let Some(item) = stream.next().await {
30-
println!("\trecived: {}", item.unwrap().message);
30+
println!("\treceived: {}", item.unwrap().message);
3131
}
3232
// stream is droped here and the disconnect info is send to server
3333
}
@@ -42,9 +42,9 @@ async fn bidirectional_streaming_echo(client: &mut EchoClient<Channel>, num: usi
4242

4343
let mut resp_stream = response.into_inner();
4444

45-
while let Some(recived) = resp_stream.next().await {
46-
let recived = recived.unwrap();
47-
println!("\trecived message: `{}`", recived.message);
45+
while let Some(received) = resp_stream.next().await {
46+
let received = received.unwrap();
47+
println!("\treceived message: `{}`", received.message);
4848
}
4949
}
5050

@@ -58,9 +58,9 @@ async fn bidirectional_streaming_echo_throttle(client: &mut EchoClient<Channel>,
5858

5959
let mut resp_stream = response.into_inner();
6060

61-
while let Some(recived) = resp_stream.next().await {
62-
let recived = recived.unwrap();
63-
println!("\trecived message: `{}`", recived.message);
61+
while let Some(received) = resp_stream.next().await {
62+
let received = received.unwrap();
63+
println!("\treceived message: `{}`", received.message);
6464
}
6565
}
6666

@@ -72,13 +72,13 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
7272
streaming_echo(&mut client, 5).await;
7373
tokio::time::sleep(Duration::from_secs(1)).await; //do not mess server println functions
7474

75-
// Echo stream that sends 17 requests then gracefull end that conection
75+
// Echo stream that sends 17 requests then graceful end that connection
7676
println!("\r\nBidirectional stream echo:");
7777
bidirectional_streaming_echo(&mut client, 17).await;
7878

7979
// Echo stream that sends up to `usize::MAX` requets. One request each 2s.
80-
// Exiting client with CTRL+C demostrate how to distinguise broken pipe from
81-
//gracefull client disconnection (above example) on the server side.
80+
// Exiting client with CTRL+C demonstrate how to distinguish broken pipe from
81+
//graceful client disconnection (above example) on the server side.
8282
println!("\r\nBidirectional stream echo (kill client with CTLR+C):");
8383
bidirectional_streaming_echo_throttle(&mut client, Duration::from_secs(2)).await;
8484

tonic/src/transport/channel/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ impl Channel {
107107

108108
/// Balance a list of [`Endpoint`]'s.
109109
///
110-
/// This creates a [`Channel`] that will load balance accross all the
110+
/// This creates a [`Channel`] that will load balance across all the
111111
/// provided endpoints.
112112
pub fn balance_list(list: impl Iterator<Item = Endpoint>) -> Self {
113113
let (channel, tx) = Self::balance_channel(DEFAULT_BUFFER_SIZE);

0 commit comments

Comments
 (0)