Skip to content

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.

2 participants