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

Fix clippy error useless_vec #533

Merged
merged 1 commit into from
Sep 26, 2023
Merged

Conversation

p-alik
Copy link
Contributor

@p-alik p-alik commented Sep 20, 2023

Removed useless vec! macro

  • Issue
14:40 $ cargo clippy --all
    Checking eif_loader v0.1.0 (/tmp/aws-nitro-enclaves-cli/eif_loader)
    Checking enclave_build v0.1.0 (/tmp/aws-nitro-enclaves-cli/enclave_build)
    Checking driver-bindings v0.1.0 (/tmp/aws-nitro-enclaves-cli/driver-bindings)
    Checking vsock-proxy v0.1.0 (/tmp/aws-nitro-enclaves-cli/vsock_proxy)
    Checking nitro-cli v1.2.2 (/tmp/aws-nitro-enclaves-cli)
error: useless use of `vec!`
   --> src/enclave_proc_comm.rs:193:22
    |
193 |     let mut events = vec![EpollEvent::empty(); 1];
    |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `[EpollEvent::empty(); 1]`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec
note: the lint level is defined here
   --> src/enclave_proc_comm.rs:4:9
    |
4   | #![deny(warnings)]
    |         ^^^^^^^^
    = note: `#[deny(clippy::useless_vec)]` implied by `#[deny(warnings)]`

error: could not compile `nitro-cli` (lib) due to previous error

Description of changes:

The only commit of the PR contains a little code amendment with respect to useless_vec

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Removed useless vec! macro

Signed-off-by: Alexei Pastuchov <[email protected]>
@meerd meerd merged commit 2b72160 into aws:main Sep 26, 2023
4 of 9 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