Skip to content

Comments

Fix unnecessary parens#126

Merged
hulthe merged 1 commit intomullvad:mainfrom
pronebird:fix-paren
Sep 12, 2025
Merged

Fix unnecessary parens#126
hulthe merged 1 commit intomullvad:mainfrom
pronebird:fix-paren

Conversation

@pronebird
Copy link
Contributor

@pronebird pronebird commented Sep 1, 2025

Applied a fix based on clippy suggestion

warning: unnecessary parentheses around closure body
  --> src/rule/tcp_flags.rs:46:40
   |
46 |         set.0.iter().fold(0, |acc, &x| (acc | u8::from(x)))
   |                                        ^                 ^
   |
   = note: `#[warn(unused_parens)]` on by default
help: remove these parentheses
   |
46 -         set.0.iter().fold(0, |acc, &x| (acc | u8::from(x)))
46 +         set.0.iter().fold(0, |acc, &x| acc | u8::from(x))
   |

warning: unnecessary parentheses around closure body
  --> src/rule/rule_log.rs:50:40
   |
50 |         set.0.iter().fold(0, |acc, &x| (acc | u8::from(x)))
   |                                        ^                 ^
   |
help: remove these parentheses
   |
50 -         set.0.iter().fold(0, |acc, &x| (acc | u8::from(x)))
50 +         set.0.iter().fold(0, |acc, &x| acc | u8::from(x))
   |

warning: `pfctl` (lib) generated 2 warnings (run `cargo fix --lib -p pfctl` to apply 2 suggestions)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.45s

This change is Reviewable

@hulthe hulthe merged commit 4d021fd into mullvad:main Sep 12, 2025
10 of 11 checks passed
@hulthe
Copy link
Contributor

hulthe commented Sep 12, 2025

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants