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

Add clippy CI, fix or ignore warnings where appropriate #563

Merged
merged 2 commits into from
Dec 29, 2024

Conversation

PThorpe92
Copy link
Contributor

There is no semantic changes in this PR, the clippy command came from @pereman2's suggestion in #542

There was more to fix than I previously thought. I originally set out to refactor out some of the logic in vdbe::step, but with some actual semantic changes. That file: vdbe/mod.rs is so full that it required moving the Insn enum to another file, so I figured I would just put some non-semantic changes all together so it's easier to review and get that done first... and figured I'd fix some clippy warnings while I was at it. Also adjusted the actions to checkout/@v3.

The project is obviously so early that there are going to be a decent amount of things like unused fields or methods, which is why I was originally not really pro clippy.. but seeing how many genuinely good improvements it recommended, I think it's probably the right way to go.

@penberg
Copy link
Collaborator

penberg commented Dec 29, 2024

Hey @PThorpe92, can you please rebase this series. I think it has conflicts now due to a8e2f48

@@ -1748,6 +1748,7 @@ pub fn translate_expr(
Ok(target_register)
}
},
#[allow(unreachable_patterns)]
Copy link
Contributor

Choose a reason for hiding this comment

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

I would remove _ => unreachable!() because having these are potential source of a bug when new variants are added to the enum.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah I believe I tried that when I implemented that feature. Unfortunately because that is the only variant, it will throw an error in this case when disabling the uuid feature.

image

@pereman2 pereman2 merged commit b9187d5 into tursodatabase:main Dec 29, 2024
36 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.

4 participants