Task #71838 - added.err

back to task #71838
download
Error: CLIPPY_WARNING:
crates/lib/src/bootc_composefs/boot.rs:142:5: warning: unneeded `return` statement
#      |
#  142 |     return Ok(parent);
#      |     ^^^^^^^^^^^^^^^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
#      = note: `#[warn(clippy::needless_return)]` on by default
#  help: remove `return`
#      |
#  142 -     return Ok(parent);
#  142 +     Ok(parent)
#      |

Error: CLIPPY_WARNING:
crates/lib/src/bootc_composefs/boot.rs:294:39: warning: useless conversion to the same type: `std::string::String`
#      |
#  294 |             let mut cmdline_options = String::from(root_setup.kargs.join(" "));
#      |                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `String::from()`: `root_setup.kargs.join(" ")`
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
#      = note: `#[warn(clippy::useless_conversion)]` on by default

Error: CLIPPY_WARNING:
crates/lib/src/bootc_composefs/boot.rs:514:16: warning: writing `&PathBuf` instead of `&Path` involves a new object where a slice will do
#      |
#  514 |     file_path: &PathBuf,
#      |                ^^^^^^^^ help: change this to: `&Path`
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg
#      = note: `#[warn(clippy::ptr_arg)]` on by default

Error: CLIPPY_WARNING:
crates/lib/src/bootc_composefs/boot.rs:703:20: warning: length comparison to zero
#      |
#  703 |                 if v.len() > 0 {
#      |                    ^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!v.is_empty()`
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero
#      = note: `#[warn(clippy::len_zero)]` on by default

Error: CLIPPY_WARNING:
crates/lib/src/bootc_composefs/boot.rs:822:23: warning: using `.iter().next()` on an array
#      |
#  822 |     let Some(entry) = entries.iter().next() else {
#      |                       ^^^^^^^^^^^^^^^^^^^^^ help: try calling: `entries.first()`
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_next_slice
#      = note: `#[warn(clippy::iter_next_slice)]` on by default

Error: CLIPPY_WARNING:
crates/lib/src/bootc_composefs/repo.rs:66:6: warning: very complex type used. Consider factoring parts into `type` definitions
#     |
#  66 |   ) -> Result<(
#     |  ______^
#  67 | |     ComposefsRepository<Sha256HashValue>,
#  68 | |     Vec<ComposefsBootEntry<Sha256HashValue>>,
#  69 | |     Sha256HashValue,
#  70 | |     FileSystem<Sha256HashValue>,
#  71 | | )> {
#     | |__^
#     |
#     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity
#     = note: `#[warn(clippy::type_complexity)]` on by default

Error: CLIPPY_WARNING:
crates/lib/src/bootc_composefs/rollback.rs:37:18: warning: useless use of `format!`
#     |
#  37 |         .context(format!("Reopening entries dir as owned fd"))?;
#     |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Reopening entries dir as owned fd".to_string()`
#     |
#     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format
#     = note: `#[warn(clippy::useless_format)]` on by default

Error: CLIPPY_WARNING:
crates/lib/src/bootc_composefs/rollback.rs:39:32: warning: useless use of `format!`
#     |
#  39 |     fsync(entries_dir).context(format!("fsync entries dir"))?;
#     |                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"fsync entries dir".to_string()`
#     |
#     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format

Error: CLIPPY_WARNING:
crates/lib/src/bootc_composefs/rollback.rs:62:26: warning: useless use of `format!`
#     |
#  62 |         .with_context(|| format!("Reopening /sysroot/boot/loader as owned fd"))?;
#     |                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Reopening /sysroot/boot/loader as owned fd".to_string()`
#     |
#     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format

Error: CLIPPY_WARNING:
crates/lib/src/bootc_composefs/status.rs:1:37: warning: importing legacy numeric constants
#    |
#  1 | use std::{io::Read, sync::OnceLock, u16};
#    |                                     ^^^
#    |
#    = help: remove this import
#    = note: then `u16::<CONST>` will resolve to the respective associated constant
#    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
#    = note: `#[warn(clippy::legacy_numeric_constants)]` on by default

Error: CLIPPY_WARNING:
crates/lib/src/bootc_composefs/status.rs:145:19: warning: slow zero-filling initialization
#      |
#  145 |       let mut buf = Vec::with_capacity(manifest.config().size() as usize);
#      |  ___________________^
#  146 | |     buf.resize(manifest.config().size() as usize, 0);
#      | |____________________________________________________^ help: consider replacing this with: `vec![0; manifest.config().size() as usize]`
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#slow_vector_initialization
#      = note: `#[warn(clippy::slow_vector_initialization)]` on by default

Error: CLIPPY_WARNING:
crates/lib/src/bootc_composefs/switch.rs:42:23: warning: using `.iter().next()` on an array
#     |
#  42 |     let Some(entry) = entries.iter().next() else {
#     |                       ^^^^^^^^^^^^^^^^^^^^^ help: try calling: `entries.first()`
#     |
#     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_next_slice

Error: CLIPPY_WARNING:
crates/lib/src/bootc_composefs/update.rs:32:23: warning: using `.iter().next()` on an array
#     |
#  32 |     let Some(entry) = entries.iter().next() else {
#     |                       ^^^^^^^^^^^^^^^^^^^^^ help: try calling: `entries.first()`
#     |
#     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_next_slice

Error: CLIPPY_WARNING:
crates/lib/src/cfsctl.rs:16:52: warning: unused import: `Sha512HashValue`
#     |
#  16 |     fsverity::{FsVerityHashValue, Sha256HashValue, Sha512HashValue},
#     |                                                    ^^^^^^^^^^^^^^^
#     |
#     = note: `#[warn(unused_imports)]` on by default

Error: CLIPPY_WARNING:
crates/lib/src/install.rs:559:16: warning: inequality checks against false are unnecessary
#      |
#  559 |             if self.composefs_opts.insecure != false {
#      |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try simplifying it as shown: `self.composefs_opts.insecure`
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_comparison
#      = note: `#[warn(clippy::bool_comparison)]` on by default

Error: CLIPPY_WARNING:
crates/lib/src/utils.rs:205:14: warning: this `repeat().take()` can be written more concisely
#      |
#  205 |     let up = std::iter::repeat(Component::ParentDir).take(from.len() - common);
#      |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `repeat_n()` instead: `std::iter::repeat_n(Component::ParentDir, from.len() - common)`
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_repeat_n
#      = note: `#[warn(clippy::manual_repeat_n)]` on by default

Error: CLIPPY_WARNING:
crates/lib/src/utils.rs:211:5: warning: unneeded `return` statement
#      |
#  211 |     return Ok(final_path);
#      |     ^^^^^^^^^^^^^^^^^^^^^
#      |
#      = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
#  help: remove `return`
#      |
#  211 -     return Ok(final_path);
#  211 +     Ok(final_path)
#      |