Skip to content

Conversation

@jjbayer
Copy link
Member

@jjbayer jjbayer commented Aug 11, 2022

  • Automatically fix linter issues introduced by clippy 0.1.63.
  • Disable lint clippy::derive_partial_eq_without_eq (see discussion below).

#skip-changelog

@jjbayer jjbayer requested a review from a team August 11, 2022 16:17
// Note: This type is represented as a u8 in Snuba/Clickhouse, with Unknown being the default
// value. We use repr(u8) to statically validate that the trace status has 255 variants at most.
#[derive(Clone, Copy, Debug, PartialEq, Serialize)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Serialize)]
Copy link
Member

@jan-auer jan-auer Aug 11, 2022

Choose a reason for hiding this comment

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

Most of our schema types do not implement Eq for a reason, because that allows us to add floats without breaking equality. There's also absolutely no disadvantage to not implementing Eq in practice.

Ultimately, this comes down to API stability. I think we should disable this lint.

Copy link
Member

Choose a reason for hiding this comment

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

yeah i wasn't entirely sure about that lint but we don't really have a stable api at all so i don't care too much.

Copy link
Member Author

Choose a reason for hiding this comment

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

There's also absolutely no disadvantage to not implementing Eq in practice.

I was surprised about this lint as well. Will remove it.

@jjbayer jjbayer requested a review from a team as a code owner August 12, 2022 07:35
@jjbayer jjbayer enabled auto-merge (squash) August 12, 2022 07:55
@jan-auer jan-auer changed the title ref: Autofix clippy ref: Fix clippy 1.63.0 lints Aug 12, 2022
@jjbayer jjbayer merged commit 0d79cf4 into master Aug 12, 2022
@jjbayer jjbayer deleted the ref/clippy branch August 12, 2022 08:28
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.

5 participants