Skip to content

Fix new clippy lints #138

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 26, 2025
Merged

Fix new clippy lints #138

merged 1 commit into from
Jun 26, 2025

Conversation

marmeladema
Copy link
Collaborator

No description provided.

@marmeladema marmeladema merged commit b4cc659 into master Jun 26, 2025
9 checks passed
@marmeladema marmeladema deleted the fix-clippy branch June 26, 2025 19:11
Comment on lines 119 to 125
let mut iter = self.0.iter();
let first = iter.next().unwrap();
write!(f, "{{{}", first)?;
write!(f, "{{{first}")?;
for expected_type in iter {
write!(f, ", {}", expected_type)?;
write!(f, ", {expected_type}")?;
}
write!(f, "}}")
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: I might be missing something, but I think this whole block can be simplified?

write!(f, "{{")?;
for expected_type in self.0.iter() {
    write!(f, ", {expected_type}")?;
}
write!(f, "}}")

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

But it means the first element would be prefixed by a comma?

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, I missed the comma completely 😅

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