From 4befdceaaf2bfed33f743506e6f84a8d87114466 Mon Sep 17 00:00:00 2001 From: tottoto Date: Mon, 26 Aug 2024 17:37:07 +0900 Subject: [PATCH] chore(router): Allow unreachable patterns (#1890) --- tonic/src/service/router.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tonic/src/service/router.rs b/tonic/src/service/router.rs index d9d7a0be8..7329d00ce 100644 --- a/tonic/src/service/router.rs +++ b/tonic/src/service/router.rs @@ -162,6 +162,9 @@ impl Future for RoutesFuture { fn poll(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll { match ready!(Pin::new(&mut self.as_mut().0).poll(cx)) { Ok(res) => Ok(res.map(boxed)).into(), + // NOTE: This pattern is not needed from Rust 1.82. + // See https://github.com/rust-lang/rust/pull/122792. + #[allow(unreachable_patterns)] Err(err) => match err {}, } }