diff --git a/tonic-health/src/server.rs b/tonic-health/src/server.rs index 0bdc7911c..577eb57c9 100644 --- a/tonic-health/src/server.rs +++ b/tonic-health/src/server.rs @@ -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 }; diff --git a/tonic/src/status.rs b/tonic/src/status.rs index f55e12982..0b3892c45 100644 --- a/tonic/src/status.rs +++ b/tonic/src/status.rs @@ -423,7 +423,7 @@ impl Status { } if let Some(h2_err) = err.source().and_then(|e| e.downcast_ref::()) { - 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);