Skip to content

read cmdline for skip_confirmation flag #13

read cmdline for skip_confirmation flag

read cmdline for skip_confirmation flag #13

GitHub Actions / clippy failed May 22, 2024 in 0s

clippy

1 error

Details

Results

Message level Amount
Internal compiler error 0
Error 1
Warning 0
Note 0
Help 0

Versions

  • rustc 1.78.0 (9b00956e5 2024-04-29)
  • cargo 1.78.0 (54d8815d0 2024-03-26)
  • clippy 0.1.78 (9b00956 2024-04-29)

Annotations

Check failure on line 290 in src/ubi/format.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

use of a fallible conversion when an infallible one could be used

error: use of a fallible conversion when an infallible one could be used
   --> src/ubi/format.rs:290:39
    |
290 |     let mut data = Vec::with_capacity(u32::try_from(eb_size).unwrap() as usize + vid_size);
    |                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: converting `NonZero<u32>` to `u32` cannot fail
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_fallible_conversions
    = note: `-D clippy::unnecessary-fallible-conversions` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(clippy::unnecessary_fallible_conversions)]`
help: use
    |
290 -     let mut data = Vec::with_capacity(u32::try_from(eb_size).unwrap() as usize + vid_size);
290 +     let mut data = Vec::with_capacity(u32::from(eb_size) as usize + vid_size);
    |