Skip to content

Conversation

@dishmaker
Copy link
Contributor

nightly cargo clippy --all --all-features --tests --fix

Similar to RustCrypto/traits#2035

#[repr(u16)]
#[derive(Default)]
pub enum ExtensionType {
#[default]
Copy link
Member

@baloo baloo Oct 7, 2025

Choose a reason for hiding this comment

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

That seems like a bad idea to default on Reserved. Not that I believe there is another more appropriate one. I think this one should be left alone

Copy link
Member

@baloo baloo left a comment

Choose a reason for hiding this comment

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

Not every enum should have a default. I think the clippy is still in nightly and should not be given too much weight.

#[derive(Default)]
pub enum Version {
/// Version 1 (default)
#[default]
Copy link
Member

Choose a reason for hiding this comment

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

This one should definitely not be v1. It should be v3 if anything.

@dishmaker
Copy link
Contributor Author

But these enums had impl Default before

@baloo
Copy link
Member

baloo commented Oct 7, 2025

Ha you mean I also need to read the left side of the diff too?! Sorry I didn't have a coffee just yet.

Yeah, this is a straight replacement which doesn't change the behavior. I'm still convinced we should at least change the Version one to default to V3.

@baloo baloo merged commit 3ee0028 into RustCrypto:master Oct 7, 2025
70 checks passed
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