Skip to content

Commit

Permalink
chore: fix some comments (#1745)
Browse files Browse the repository at this point in the history
Signed-off-by: renshuncui <renshun@111.com>
  • Loading branch information
renshuncui committed Jun 21, 2024
1 parent cf46316 commit f7090c2
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion examples/src/richer-error/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ impl Greeter for MyGreeter {
}

if err_details.has_bad_request_violations() {
// Add aditional error details if necessary
// Add additional error details if necessary
err_details
.add_help_link("description of link", "https://resource.example.local")
.set_localized_message("en-US", "message for the user");
Expand Down
2 changes: 1 addition & 1 deletion examples/src/richer-error/server_vec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ impl Greeter for MyGreeter {
}

if !bad_request.is_empty() {
// Add aditional error details if necessary
// Add additional error details if necessary
let help = Help::with_link("description of link", "https://resource.example.local");

let localized_message = LocalizedMessage::new("en-US", "message for the user");
Expand Down
2 changes: 1 addition & 1 deletion examples/src/streaming/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ impl pb::echo_server::Echo for EchoServer {

match tx.send(Err(err)).await {
Ok(_) => (),
Err(_err) => break, // response was droped
Err(_err) => break, // response was dropped
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion examples/src/tls_rustls/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = hyper_util::client::legacy::Client::builder(TokioExecutor::new()).build(connector);

// Using `with_origin` will let the codegenerated client set the `scheme` and
// `authority` from the porvided `Uri`.
// `authority` from the provided `Uri`.
let uri = Uri::from_static("https://example.com");
let mut client = EchoClient::with_origin(client, uri);

Expand Down
4 changes: 2 additions & 2 deletions tonic-build/src/prost.rs
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ impl Builder {
///
/// Passed directly to `prost_build::Config.btree_map`.
///
/// Note: previous configurated paths for `btree_map` will be cleared.
/// Note: previous configured paths for `btree_map` will be cleared.
pub fn btree_map<I, S>(mut self, paths: I) -> Self
where
I: IntoIterator<Item = S>,
Expand All @@ -438,7 +438,7 @@ impl Builder {
///
/// Passed directly to `prost_build::Config.bytes`.
///
/// Note: previous configurated paths for `bytes` will be cleared.
/// Note: previous configured paths for `bytes` will be cleared.
pub fn bytes<I, S>(mut self, paths: I) -> Self
where
I: IntoIterator<Item = S>,
Expand Down
2 changes: 1 addition & 1 deletion tonic-web/src/call.rs
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ where
}
Poll::Ready(Some(Ok(Frame::data(frame.into()))))
}
Some(Ok(_)) => Poll::Ready(Some(Err(internal_error("unexepected frame type")))),
Some(Ok(_)) => Poll::Ready(Some(Err(internal_error("unexpected frame type")))),
Some(Err(e)) => Poll::Ready(Some(Err(internal_error(e)))),
None => Poll::Ready(None),
}
Expand Down

0 comments on commit f7090c2

Please sign in to comment.