Skip to content
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

Fix remaining cargo warnings #331

Merged
merged 2 commits into from
Aug 18, 2024
Merged

Fix remaining cargo warnings #331

merged 2 commits into from
Aug 18, 2024

Conversation

korrat
Copy link
Contributor

@korrat korrat commented Aug 14, 2024

This PR fixes all warnings reported by cargo clippy without further settings.

There is one more warning on this line, due to the experimental lint, which is not supported on stable Rust. This occurs in cargo test and cargo doc.

#![cfg_attr(doc, allow(rustdoc::missing_doc_code_examples))]

The fix in the second commit changes behaviour, though arguably, that was the intended behaviour. Alternatively, using .truncate(false) would explicitly preserve the current behaviour.

This change specifies `.truncate(true)`, to match the behaviour which
was likely intended. However, this presents a difference to the previous
behaviour, which is equal to `.truncate(false)`.
Copy link
Owner

@jonhoo jonhoo left a comment

Choose a reason for hiding this comment

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

Nice, thank you!

@jonhoo jonhoo merged commit f8361cb into jonhoo:main Aug 18, 2024
13 of 14 checks passed
RedPhoenixQ pushed a commit to RedPhoenixQ/inferno that referenced this pull request Oct 28, 2024
This change specifies `.truncate(true)`, to match the behaviour which
was likely intended. However, this presents a difference to the previous
behaviour, which is equal to `.truncate(false)`.
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