Re: [PATCH] rust: cpufreq: fix clippy::double_parens warning in Policy doctest
From: John Hubbard
Date: Wed Mar 04 2026 - 15:35:29 EST
On 3/4/26 12:30 PM, Gary Guo wrote:
> On Wed Mar 4, 2026 at 7:53 PM GMT, John Hubbard wrote:
>> Clippy reports:
>> warning: consider removing unnecessary double parentheses
>> --> rust/kernel/cpufreq.rs:410:60
>> |
>> 410 | pr_info!("The policy details are: {:?}\n", (policy.cpu(), policy.cur()));
>> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>>
>
> This looks like a Clippy bug that's fixed in latest Clippy:
>
> https://github.com/rust-lang/rust-clippy/pull/15939
>
Looks like it, yes. I'm using the 1.78 toolchain because it is
the oldest and we are supposed to verify that builds work with
the oldest:
<blueforge> linux-github (fix-clippy-double-parens-v2)$ clippy-driver --version
clippy 0.1.78 (9b00956 2024-04-29)
<blueforge> linux-github (fix-clippy-double-parens-v2)$ rustup which clippy-driver
/home/jhubbard/.rustup/toolchains/1.78.0-x86_64-unknown-linux-gnu/bin/clippy-driver
I'm not sure if this means we should workaround the problem or not.
thanks,
--
John Hubbard