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: fix clippy lints for 1.83 #211

Merged
merged 2 commits into from
Dec 1, 2024
Merged

Conversation

muzarski
Copy link
Collaborator

  • derive(FromPrimitive) does not work with new clippy. Need to implement it manually We can maybe revert it in the future. However, this change is not a big deal.
  • Converted all manually created c-strings to c"" literals
  • Removed some unnecessary return statements detected by clippy

Pre-review checklist

  • I have split my patch into logically separate commits.
  • All commit messages clearly explain what they change and why.
  • PR description sums up the changes and reasons why they should be introduced.
  • I have implemented Rust unit tests for the features/changes introduced.
  • I have enabled appropriate tests in .github/workflows/build.yml in gtest_filter.
  • I have enabled appropriate tests in .github/workflows/cassandra.yml in gtest_filter.

- derive(FromPrimitive) does not work with new clippy. Need to implement it manually
  We can maybe revert it in the future. However, this change is not a big deal.
- Converted all manually created c-strings to c"" literals
- Removed some unnecessary return statements detected by clippy
@muzarski muzarski self-assigned this Nov 28, 2024
Copy link
Collaborator

@Lorak-mmk Lorak-mmk left a comment

Choose a reason for hiding this comment

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

Converted all manually created c-strings to c"" literals

Love it! But I'm surprised there is that few of them, I thought there was much more. Isn't there more in error stringifying function etc?

scylla-rust-wrapper/src/cluster.rs Show resolved Hide resolved
@muzarski
Copy link
Collaborator Author

Converted all manually created c-strings to c"" literals

Isn't there more in error stringifying function etc?

You are right. I'm not sure why clippy did not detect them. I'll fix those in a separate commit.

@muzarski muzarski requested a review from Lorak-mmk November 28, 2024 18:51
@muzarski
Copy link
Collaborator Author

v2: replaced all occurrences of "...\0" with c"..." string literals

@muzarski muzarski merged commit cd63ce3 into scylladb:master Dec 1, 2024
11 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.

3 participants