Skip to content

Conversation

shariqnaiyer
Copy link
Contributor

@shariqnaiyer shariqnaiyer commented Oct 17, 2025

What was wrong?

Make pr gave me the following error:

error: this `impl` can be derived
  --> crates/common/api_types/beacon/src/block.rs:21:1
   |
21 | / impl Default for BroadcastValidation {
22 | |     fn default() -> Self {
23 | |         Self::Gossip
24 | |     }
25 | | }
   | |_^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls
   = note: `-D clippy::derivable-impls` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::derivable_impls)]`

How was it fixed?

help: replace the manual implementation with a derive attribute and mark the default variant
   |
11 + #[derive(Default)]
12 ~ pub enum BroadcastValidation {
13 |     /// Lightweight gossip checks only (default)
14 ~     #[default]
15 ~     Gossip,

To-Do

@shariqnaiyer shariqnaiyer requested a review from KolbyML as a code owner October 17, 2025 07:35
@shariqnaiyer shariqnaiyer changed the title fix: make pr clippy default for BroadcastValidation fix: clippy error for making Gossip default variant for BroadcastValidation Oct 17, 2025
Copy link
Contributor

@KolbyML KolbyML left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit: looks good

@KolbyML KolbyML enabled auto-merge October 17, 2025 07:41
@KolbyML KolbyML added this pull request to the merge queue Oct 17, 2025
Merged via the queue into ReamLabs:master with commit ad57986 Oct 17, 2025
17 checks passed
@shariqnaiyer shariqnaiyer deleted the fix/shariqnaiyer/clippy branch October 18, 2025 01:52
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