diff --git a/tonic/src/client/grpc.rs b/tonic/src/client/grpc.rs index f498796..0df98a2 100644 --- a/tonic/src/client/grpc.rs +++ b/tonic/src/client/grpc.rs @@ -22,8 +22,8 @@ use std::fmt; /// Each request method takes a [`Request`], a [`PathAndQuery`], and a /// [`Codec`]. The request contains the message to send via the /// [`Codec::encoder`]. The path determines the fully qualified path -/// that will be appened to the outgoing uri. The path must follow -/// the convetions explained in the [gRPC protocol definition] under `Path →`. An +/// that will be append to the outgoing uri. The path must follow +/// the conventions explained in the [gRPC protocol definition] under `Path →`. An /// example of this path could look like `/greeter.Greeter/SayHello`. /// /// [gRPC protocol definition]: https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md#requests diff --git a/tonic/src/codec/decode.rs b/tonic/src/codec/decode.rs index 8169ac4..117ed64 100644 --- a/tonic/src/codec/decode.rs +++ b/tonic/src/codec/decode.rs @@ -101,7 +101,7 @@ impl Streaming { /// Fetch the trailing metadata. /// - /// This will drain the stream of all its messages to recieve the trailing + /// This will drain the stream of all its messages to receive the trailing /// metadata. If [`Streaming::message`] returns `None` then this function /// will not need to poll for trailers since the body was totally consumed. pub async fn trailers(&mut self) -> Result, Status> { @@ -192,7 +192,7 @@ impl Stream for Streaming { fn poll_next(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll> { loop { // TODO: implement the ability to poll trailers when we _know_ that - // the comnsumer of this stream will only poll for the first message. + // the consumer of this stream will only poll for the first message. // This means we skip the poll_trailers step. match self.decode_chunk()? { Some(item) => return Poll::Ready(Some(Ok(item))), diff --git a/tonic/src/metadata/map.rs b/tonic/src/metadata/map.rs index b14baa9..36483da 100644 --- a/tonic/src/metadata/map.rs +++ b/tonic/src/metadata/map.rs @@ -217,7 +217,7 @@ impl MetadataMap { /// Convert an HTTP HeaderMap to a MetadataMap pub fn from_headers(headers: http::HeaderMap) -> Self { - MetadataMap { headers: headers } + MetadataMap { headers } } /// Convert a MetadataMap into a HTTP HeaderMap