From 456efde245fdd1de7883456524ca9fb428a1438e Mon Sep 17 00:00:00 2001 From: mejrs <59372212+mejrs@users.noreply.github.com> Date: Mon, 19 Jun 2023 19:48:04 +0200 Subject: [PATCH] Replace unreachable! with empty enum match --- pyo3-build-config/src/errors.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyo3-build-config/src/errors.rs b/pyo3-build-config/src/errors.rs index 6f57e0e6..26108c29 100644 --- a/pyo3-build-config/src/errors.rs +++ b/pyo3-build-config/src/errors.rs @@ -87,8 +87,8 @@ impl From<&'_ str> for Error { } impl From for Error { - fn from(_: std::convert::Infallible) -> Self { - unreachable!() + fn from(x: std::convert::Infallible) -> Self { + match x {} } }