From 744a0f435f9512b1d4877f6796db81e24d4049b8 Mon Sep 17 00:00:00 2001 From: sendittothenewts Date: Fri, 10 Oct 2025 15:09:33 +0100 Subject: [PATCH] Fix `clippy::double_parens` lint in `throw!` As of Rust nightly 2025-10-08, every use of the `throw!` macros now emits this warn-by-default lint. The warning is seen by downstream users of culpa, but not when linting culpa itself, unless you pass the `--all-targets` flag to `cargo clippy` to lint the tests. https://github.com/rust-lang/rust-clippy/issues/15852#issuecomment-3387461230 suggests that this new behaviour is by design. This simply removes the redundant brackets introduced by a5b67d1b20c820f7c11a7faaa5fd64cb410b6402. --- src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index f7d6c36..2e11aa7 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -132,7 +132,7 @@ pub use culpa_macros::try_fn; #[macro_export] macro_rules! throw { ($err:expr) => { - return <_ as $crate::__internal::_Throw>::from_error((::core::convert::From::from($err))) + return <_ as $crate::__internal::_Throw>::from_error(::core::convert::From::from($err)) }; () => { return <_ as ::core::default::Default>::default()