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

cleaning clippy warnings #253

Merged
merged 7 commits into from
Jan 19, 2023
Merged

cleaning clippy warnings #253

merged 7 commits into from
Jan 19, 2023

Conversation

gkorland
Copy link
Contributor

No description provided.

@gkorland gkorland requested a review from oshadmi December 22, 2022 10:12
Copy link
Collaborator

@MeirShpilraien MeirShpilraien left a comment

Choose a reason for hiding this comment

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

Small questions..

src/lib.rs Outdated
@@ -52,8 +50,8 @@ pub enum LogLevel {
Warning,
}

fn from_byte_string(byte_str: *const c_char, length: size_t) -> Result<String, Utf8Error> {
let mut vec_str: Vec<u8> = Vec::with_capacity(length as usize);
fn from_byte_string(byte_str: *const c_char, length: usize) -> Result<String, Utf8Error> {
Copy link
Contributor

Choose a reason for hiding this comment

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

So we can assume size_t is usize (except for niche platforms, which will break as explained here and here)

src/raw.rs Show resolved Hide resolved
@gkorland gkorland requested a review from oshadmi January 19, 2023 10:42
Copy link
Contributor

@oshadmi oshadmi left a comment

Choose a reason for hiding this comment

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

👍🏼

@gkorland gkorland merged commit 70960fc into master Jan 19, 2023
@gkorland gkorland deleted the gkorland-clippy-cleanup3 branch January 19, 2023 18:57
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