From f4fd177c43047b80ff789ad03455e7dbbd9967f1 Mon Sep 17 00:00:00 2001 From: tottoto Date: Sat, 24 Aug 2024 14:15:27 +0900 Subject: [PATCH] chore(router): Allow unreachable patterns --- 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 {}, } }