Skip to content

Commit

Permalink
chore: Fix clippy warning (#1346)
Browse files Browse the repository at this point in the history
  • Loading branch information
tottoto authored Apr 6, 2023
1 parent fa06baf commit 9990e6e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions tonic-health/src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ impl Health for HealthService {
let status = crate::pb::health_check_response::ServingStatus::from(*status_rx.borrow()) as i32;
yield HealthCheckResponse { status };

#[allow(clippy::redundant_pattern_matching)]
while let Ok(_) = status_rx.changed().await {
let status = crate::pb::health_check_response::ServingStatus::from(*status_rx.borrow()) as i32;
yield HealthCheckResponse { status };
Expand Down
2 changes: 1 addition & 1 deletion tonic/src/status.rs
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ impl Status {
}

if let Some(h2_err) = err.source().and_then(|e| e.downcast_ref::<h2::Error>()) {
let code = Status::code_from_h2(&h2_err);
let code = Status::code_from_h2(h2_err);
let status = Self::new(code, format!("h2 protocol error: {}", err));

return Some(status);
Expand Down

0 comments on commit 9990e6e

Please sign in to comment.