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 #321

Merged
merged 1 commit into from
Aug 28, 2022
Merged

clippy fix #321

merged 1 commit into from
Aug 28, 2022

Conversation

termoshtt
Copy link
Member

No description provided.

@termoshtt termoshtt self-assigned this Aug 28, 2022
@termoshtt termoshtt marked this pull request as draft August 28, 2022 13:17
@termoshtt termoshtt changed the title clippy fix Revise uninitialized memoery management Aug 28, 2022
@termoshtt termoshtt changed the title Revise uninitialized memoery management clippy fix Aug 28, 2022
@termoshtt
Copy link
Member Author

error: calling `set_len()` immediately after reserving a buffer creates uninitialized values
Error:    --> lax/src/lib.rs:179:5
    |
179 |     let mut v = Vec::with_capacity(n);
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
180 |     v.set_len(n);
    |     ^^^^^^^^^^^^
    |
    = note: `#[deny(clippy::uninit_vec)]` on by default
    = help: initialize the buffer or wrap the content in `MaybeUninit`
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninit_vec

Fix this problem should be another PR. This PR only run cargo clippy --fix

@termoshtt termoshtt marked this pull request as ready for review August 28, 2022 13:20
@termoshtt termoshtt merged commit 2ee6186 into master Aug 28, 2022
@termoshtt termoshtt deleted the clippy-fix branch August 28, 2022 13:36
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.

None yet

1 participant