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

Clippy fixes #36

Merged
merged 5 commits into from
Nov 22, 2023
Merged

Clippy fixes #36

merged 5 commits into from
Nov 22, 2023

Conversation

waywardmonkeys
Copy link
Contributor

This is a good start on fixing things that clippy reports.

Copy link
Owner

@ptal ptal left a comment

Choose a reason for hiding this comment

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

Thanks! A small question below though.

@@ -246,7 +243,7 @@ mod test {
fn from_shape(&mut self, depth: usize, shape: &TreeShape) -> usize {
use self::TreeShape::*;
match shape {
&Node(ref value, ref children) if depth > 0 => {
Node(value, children) if depth > 0 => {
Copy link
Owner

Choose a reason for hiding this comment

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

I see ref was removed in many places, is it by reference by default now? Instead of being by copy?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This changed some years ago as part of match ergonomics: https://rust-lang.github.io/rfcs/2005-match-ergonomics.html

Copy link
Owner

Choose a reason for hiding this comment

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

My Rust knowledge is completely outdated 😓 Thanks.

@ptal ptal merged commit 9768dd2 into ptal:master Nov 22, 2023
3 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