From c0e4f43d61a51641914ae30d6795b8bad1b86a5f Mon Sep 17 00:00:00 2001 From: Otto Moerbeek Date: Mon, 15 Dec 2025 09:24:03 +0100 Subject: [PATCH] No need to do a downcast dance and include fix for https://github.com/dtolnay/cxx/issues/1684 Signed-off-by: Otto Moerbeek --- .../recursordist/rec-rust-lib/rust/Cargo.lock | 20 +++++++++---------- .../recursordist/rec-rust-lib/rust/src/web.rs | 13 +----------- 2 files changed, 11 insertions(+), 22 deletions(-) diff --git a/pdns/recursordist/rec-rust-lib/rust/Cargo.lock b/pdns/recursordist/rec-rust-lib/rust/Cargo.lock index 5c714d2097..0df00798f7 100644 --- a/pdns/recursordist/rec-rust-lib/rust/Cargo.lock +++ b/pdns/recursordist/rec-rust-lib/rust/Cargo.lock @@ -81,9 +81,9 @@ dependencies = [ [[package]] name = "cxx" -version = "1.0.190" +version = "1.0.191" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7620f6cfc4dcca21f2b085b7a890e16c60fd66f560cd69ee60594908dc72ab1" +checksum = "cd46505a9588ea42961c833d8e20a8956741f26f4aa84f5248a60c2137bf0373" dependencies = [ "cc", "cxx-build", @@ -96,9 +96,9 @@ dependencies = [ [[package]] name = "cxx-build" -version = "1.0.190" +version = "1.0.191" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a9bc1a22964ff6a355fbec24cf68266a0ed28f8b84c0864c386474ea3d0e479" +checksum = "b78549cfae183ba0391f186544fdf1f5d96e9d3cf2683ee1449a3aea066e4e32" dependencies = [ "cc", "codespan-reporting", @@ -111,9 +111,9 @@ dependencies = [ [[package]] name = "cxxbridge-cmd" -version = "1.0.190" +version = "1.0.191" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1f29a879d35f7906e3c9b77d7a1005a6a0787d330c09dfe4ffb5f617728cb44" +checksum = "b5f593aa804e4cd4fda75ca4c56820c15a27ac667f02bffe626c2ed16e2d747d" dependencies = [ "clap", "codespan-reporting", @@ -125,15 +125,15 @@ dependencies = [ [[package]] name = "cxxbridge-flags" -version = "1.0.190" +version = "1.0.191" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d67109015f93f683e364085aa6489a5b2118b4a40058482101d699936a7836d6" +checksum = "e5e77806f6ca008fe3cb35ac747db8f5cf30c038b81ae97077a6aecd7ca01a31" [[package]] name = "cxxbridge-macro" -version = "1.0.190" +version = "1.0.191" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d187e019e7b05a1f3e69a8396b70800ee867aa9fc2ab972761173ccee03742df" +checksum = "e751ebe2dee4a88a26df4f11c2baf6aa1e7f652af9a3bef5b4db5ae33397577d" dependencies = [ "indexmap", "proc-macro2", diff --git a/pdns/recursordist/rec-rust-lib/rust/src/web.rs b/pdns/recursordist/rec-rust-lib/rust/src/web.rs index 2f454f47b1..c95cdd5f0d 100644 --- a/pdns/recursordist/rec-rust-lib/rust/src/web.rs +++ b/pdns/recursordist/rec-rust-lib/rust/src/web.rs @@ -957,18 +957,7 @@ pub fn serveweb( runtime.block_on(async { while let Some(res) = set.join_next().await { let msg = match res { - Ok(Err(wrapped)) => { - // We (potentially) have a Boxed std::IO::Error - // and we just want the error description, not a { kind = Other, error = "description" } string - let err = wrapped.downcast::(); - if let Ok(ioerr) = err { - // downcast worked, so ioerr is a std::io::Error - ioerr.to_string() - } else { - // Otherwise just pass the default formatted error - format!("{:?}", err) - } - } + Ok(Err(wrapped)) => wrapped.to_string(), _ => format!("{:?}", res), }; rustmisc::error( -- 2.47.3