Task #95084 - bootc-202601231201.gfece2e0b58-1/scan-results.err
back to task #95084download
Error: SHELLCHECK_WARNING (CWE-457):
/usr/lib/dracut/modules.d/51bootc/module-setup.sh:16:18: warning[SC2154]: systemdsystemunitdir is referenced but not assigned.
# 14| local service=bootc-root-setup.service
# 15| dracut_install /usr/lib/bootc/initramfs-setup
# 16|-> inst_simple "${systemdsystemunitdir}/${service}"
# 17| mkdir -p "${initdir}${systemdsystemconfdir}/initrd-root-fs.target.wants"
# 18| ln_r "${systemdsystemunitdir}/${service}" \
Error: SHELLCHECK_WARNING (CWE-457):
/usr/lib/dracut/modules.d/51bootc/module-setup.sh:17:15: warning[SC2154]: initdir is referenced but not assigned.
# 15| dracut_install /usr/lib/bootc/initramfs-setup
# 16| inst_simple "${systemdsystemunitdir}/${service}"
# 17|-> mkdir -p "${initdir}${systemdsystemconfdir}/initrd-root-fs.target.wants"
# 18| ln_r "${systemdsystemunitdir}/${service}" \
# 19| "${systemdsystemconfdir}/initrd-root-fs.target.wants/${service}"
Error: SHELLCHECK_WARNING (CWE-457):
/usr/lib/dracut/modules.d/51bootc/module-setup.sh:17:25: warning[SC2154]: systemdsystemconfdir is referenced but not assigned.
# 15| dracut_install /usr/lib/bootc/initramfs-setup
# 16| inst_simple "${systemdsystemunitdir}/${service}"
# 17|-> mkdir -p "${initdir}${systemdsystemconfdir}/initrd-root-fs.target.wants"
# 18| ln_r "${systemdsystemunitdir}/${service}" \
# 19| "${systemdsystemconfdir}/initrd-root-fs.target.wants/${service}"
Error: COMPILER_WARNING (CWE-704):
bootc-202601231201.gfece2e0b58/vendor/libz-sys/src/smoke.c: scope_hint: In function 'main'
bootc-202601231201.gfece2e0b58/vendor/libz-sys/src/smoke.c:4:10: warning[-Wpointer-to-int-cast]: cast from pointer to integer of different size
# 2|
# 3| int main() {
# 4|-> return (int) adler32;
# 5| }
Error: CLIPPY_WARNING:
crates/etc-merge/src/lib.rs:78:5: warning: unneeded `return` statement
# |
# 78 | return true;
# | ^^^^^^^^^^^
# |
# = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_return
# = note: `#[warn(clippy::needless_return)]` on by default
# help: remove `return`
# |
# 78 - return true;
# 78 + true
# |
Error: CLIPPY_WARNING:
crates/etc-merge/src/lib.rs:310:5: warning: doc list item without indentation
# |
# 310 | /// Usually this will be obtained by remounting the EROFS image to a temporary location
# | ^
# |
# = help: if this is supposed to be its own paragraph, add a blank line
# = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#doc_lazy_continuation
# = note: `#[warn(clippy::doc_lazy_continuation)]` on by default
# help: indent this line
# |
# 310 | /// Usually this will be obtained by remounting the EROFS image to a temporary location
# | ++
Error: CLIPPY_WARNING:
crates/etc-merge/src/lib.rs:315:5: warning: doc list item without indentation
# |
# 315 | /// again be usually obtained by mounting the new EROFS image to a temporary location. If merging
# | ^
# |
# = help: if this is supposed to be its own paragraph, add a blank line
# = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#doc_lazy_continuation
# help: indent this line
# |
# 315 | /// again be usually obtained by mounting the new EROFS image to a temporary location. If merging
# | ++
Error: CLIPPY_WARNING:
crates/etc-merge/src/lib.rs:316:5: warning: doc list item without indentation
# |
# 316 | /// it will be necessary to make the `/etc` for the deployment writeable
# | ^
# |
# = help: if this is supposed to be its own paragraph, add a blank line
# = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#doc_lazy_continuation
# help: indent this line
# |
# 316 | /// it will be necessary to make the `/etc` for the deployment writeable
# | ++
Error: CLIPPY_WARNING:
crates/etc-merge/src/lib.rs:329:6: warning: very complex type used. Consider factoring parts into `type` definitions
# |
# 329 | ) -> anyhow::Result<(
# | ______^
# 330 | | Directory<CustomMetadata>,
# 331 | | Directory<CustomMetadata>,
# 332 | | Option<Directory<CustomMetadata>>,
# 333 | | )> {
# | |__^
# |
# = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#type_complexity
# = note: `#[warn(clippy::type_complexity)]` on by default
Error: CLIPPY_WARNING:
crates/etc-merge/src/lib.rs:353:5: warning: unneeded `return` statement
# |
# 353 | return Ok((pristine_etc_files, current_etc_files, new_etc_files));
# | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
# |
# = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_return
# help: remove `return`
# |
# 353 - return Ok((pristine_etc_files, current_etc_files, new_etc_files));
# 353 + Ok((pristine_etc_files, current_etc_files, new_etc_files))
# |
Error: CLIPPY_WARNING:
crates/etc-merge/src/lib.rs:458:35: warning: useless use of `format!`
# |
# 458 | let entry = entry.context(format!("Getting entry"))?;
# | ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Getting entry".to_string()`
# |
# = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#useless_format
# = note: `#[warn(clippy::useless_format)]` on by default
Error: CLIPPY_WARNING:
crates/kernel_cmdline/src/utf8.rs:371:9: warning: this `if` statement can be collapsed
# |
# 371 | / if let Some(value) = bytes.value() {
# 372 | | if str::from_utf8(value).is_err() {
# 373 | | anyhow::bail!("Parameter value is not valid UTF-8");
# 374 | | }
# 375 | | }
# | |_________^
# |
# = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#collapsible_if
# = note: `#[warn(clippy::collapsible_if)]` on by default
# help: collapse nested if block
# |
# 371 ~ if let Some(value) = bytes.value()
# 372 ~ && str::from_utf8(value).is_err() {
# 373 | anyhow::bail!("Parameter value is not valid UTF-8");
# 374 ~ }
# |
Error: CLIPPY_WARNING:
crates/lib/src/bootc_composefs/boot.rs:441:6: warning: very complex type used. Consider factoring parts into `type` definitions
# |
# 441 | ) -> Result<Option<(String, Option<String>, Option<String>)>> {
# | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
# |
# = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#type_complexity
# = note: `#[warn(clippy::type_complexity)]` on by default
Error: CLIPPY_WARNING:
crates/lib/src/bootc_composefs/boot.rs:547:21: warning: useless conversion to the same type: `bootc_kernel_cmdline::utf8::Cmdline<'_>`
# |
# 547 | Cmdline::from(options)
# | ^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `Cmdline::from()`: `options`
# |
# = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#useless_conversion
# = note: `#[warn(clippy::useless_conversion)]` on by default
Error: CLIPPY_WARNING:
crates/lib/src/bootc_composefs/boot.rs:788:1: warning: this function has too many arguments (8/7)
# |
# 788 | / fn write_pe_to_esp(
# 789 | | repo: &crate::store::ComposefsRepository,
# 790 | | file: &RegularFile<Sha512HashValue>,
# 791 | | file_path: &Utf8Path,
# ... |
# 796 | | bootloader: &Bootloader,
# 797 | | ) -> Result<Option<UKIInfo>> {
# | |____________________________^
# |
# = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#too_many_arguments
# = note: `#[warn(clippy::too_many_arguments)]` on by default
Error: CLIPPY_WARNING:
crates/lib/src/bootc_composefs/boot.rs:881:29: warning: called `Iterator::last` on a `DoubleEndedIterator`; this will needlessly iterate the entire iterator
# |
# 881 | PEType::UkiAddon => file_path
# | _____________________________^
# 882 | | .components()
# 883 | | .last()
# | |______________-----^
# | |
# | help: try: `next_back()`
# |
# = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#double_ended_iterator_last
# = note: `#[warn(clippy::double_ended_iterator_last)]` on by default
Error: CLIPPY_WARNING:
crates/lib/src/bootc_composefs/boot.rs:1110:38: warning: called `Iterator::last` on a `DoubleEndedIterator`; this will needlessly iterate the entire iterator
# |
# 1110 | let addon_name = entry
# | ______________________________________^
# 1111 | | .file_path
# 1112 | | .components()
# 1113 | | .last()
# | |__________________________-----^
# | |
# | help: try: `next_back()`
# |
# = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#double_ended_iterator_last
Error: CLIPPY_WARNING:
crates/lib/src/bootc_composefs/boot.rs:1205:5: warning: unneeded `return` statement
# |
# 1205 | / return Ok(Some(SecurebootKeys {
# 1206 | | dir: keys_dir,
# 1207 | | keys: entries,
# 1208 | | }));
# | |_______^
# |
# = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_return
# = note: `#[warn(clippy::needless_return)]` on by default
# help: remove `return`
# |
# 1205 ~ Ok(Some(SecurebootKeys {
# 1206 + dir: keys_dir,
# 1207 + keys: entries,
# 1208 ~ }))
# |
Error: CLIPPY_WARNING:
crates/lib/src/bootc_composefs/boot.rs:1254:23: warning: using `.iter().next()` on an array
# |
# 1254 | let Some(entry) = entries.iter().next() else {
# | ^^^^^^^^^^^^^^^^^^^^^ help: try calling: `entries.first()`
# |
# = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#iter_next_slice
# = note: `#[warn(clippy::iter_next_slice)]` on by default
Error: CLIPPY_WARNING:
crates/lib/src/bootc_composefs/delete.rs:320:8: warning: taken reference of right operand
# |
# 320 | if deployment_id == &booted.verity {
# | ^^^^^^^^^^^^^^^^^--------------
# | |
# | help: use the right value directly: `booted.verity`
# |
# = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#op_ref
# = note: `#[warn(clippy::op_ref)]` on by default
Error: CLIPPY_WARNING:
crates/lib/src/bootc_composefs/delete.rs:334:27: warning: this `map_or` can be simplified
# |
# 334 | let deleting_staged = host
# | ___________________________^
# 335 | | .status
# 336 | | .staged
# 337 | | .as_ref()
# 338 | | .and_then(|s| s.composefs.as_ref())
# 339 | | .map_or(false, |cfs| cfs.verity == deployment_id);
# | |_________________________________________________________^
# |
# = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#unnecessary_map_or
# = note: `#[warn(clippy::unnecessary_map_or)]` on by default
# help: use is_some_and instead
# |
# 339 - .map_or(false, |cfs| cfs.verity == deployment_id);
# 339 + .is_some_and(|cfs| cfs.verity == deployment_id);
# |
Error: CLIPPY_WARNING:
crates/lib/src/bootc_composefs/export.rs:168:36: warning: using `clone` on type `Option<&History>` which implements the `Copy` trait
# |
# 168 | let previous_description = history_entry
# | ____________________________________^
# 169 | | .clone()
# | |____________________^ help: try removing the `clone` call: `history_entry`
# |
# = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#clone_on_copy
# = note: `#[warn(clippy::clone_on_copy)]` on by default
Error: CLIPPY_WARNING:
crates/lib/src/bootc_composefs/repo.rs:74:16: warning: writing `&String` instead of `&str` involves a new object where a slice will do
# |
# 74 | transport: &String,
# | ^^^^^^^ help: change this to: `&str`
# |
# = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#ptr_arg
# = note: `#[warn(clippy::ptr_arg)]` on by default
Error: CLIPPY_WARNING:
crates/lib/src/bootc_composefs/repo.rs:75:12: warning: writing `&String` instead of `&str` involves a new object where a slice will do
# |
# 75 | image: &String,
# | ^^^^^^^ help: change this to: `&str`
# |
# = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#ptr_arg
Error: CLIPPY_WARNING:
crates/lib/src/bootc_composefs/state.rs:120:5: warning: returning the result of a `let` binding from a block
# |
# 111 | / let cp_ret = Command::new("cp")
# 112 | | .args([
# 113 | | "-a",
# 114 | | "--remove-destination",
# ... |
# 117 | | ])
# 118 | | .run_capture_stderr();
# | |______________________________- unnecessary `let` binding
# 119 |
# 120 | cp_ret
# | ^^^^^^
# |
# = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#let_and_return
# = note: `#[warn(clippy::let_and_return)]` on by default
# help: return the expression directly
# |
# 111 ~
# 112 |
# 113 ~ Command::new("cp")
# 114 + .args([
# 115 + "-a",
# 116 + "--remove-destination",
# 117 + &format!("{}/etc/.", tempdir.dir.path().as_str()?),
# 118 + &format!("{state_path}/etc/."),
# 119 + ])
# 120 + .run_capture_stderr()
# |
Error: CLIPPY_WARNING:
crates/lib/src/bootc_composefs/status.rs:209:19: warning: slow zero-filling initialization
# |
# 209 | let mut buf = Vec::with_capacity(manifest.config().size() as usize);
# | ___________________^
# 210 | | 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/rust-1.92.0/index.html#slow_vector_initialization
# = note: `#[warn(clippy::slow_vector_initialization)]` on by default
Error: CLIPPY_WARNING:
crates/lib/src/bootc_composefs/status.rs:422:5: warning: unneeded `return` statement
# |
# 422 | return true;
# | ^^^^^^^^^^^
# |
# = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_return
# help: remove `return`
# |
# 422 - return true;
# 422 + true
# |
Error: CLIPPY_WARNING:
crates/lib/src/bootc_composefs/status.rs:439:43: warning: deref which would be done by auto-deref
# |
# 439 | let booted_bls_entry = find_bls_entry(&*booted_cmdline.digest, &bls_entries)?
# | ^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&booted_cmdline.digest`
# |
# = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#explicit_auto_deref
# = note: `#[warn(clippy::explicit_auto_deref)]` on by default
Error: CLIPPY_WARNING:
crates/lib/src/bootc_composefs/status.rs:478:8: warning: needless call to `as_bytes`
# |
# 478 | if depl_cmdline.as_bytes().len() != booted_cmdline.as_bytes().len() {
# | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: `len()` can be called directly on strings: `depl_cmdline.len()`
# |
# = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_as_bytes
# = note: `#[warn(clippy::needless_as_bytes)]` on by default
Error: CLIPPY_WARNING:
crates/lib/src/bootc_composefs/status.rs:478:41: warning: needless call to `as_bytes`
# |
# 478 | if depl_cmdline.as_bytes().len() != booted_cmdline.as_bytes().len() {
# | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: `len()` can be called directly on strings: `booted_cmdline.len()`
# |
# = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_as_bytes
Error: CLIPPY_WARNING:
crates/lib/src/bootc_composefs/status.rs:483:5: warning: unneeded `return` statement
# |
# 483 | / return compare_cmdline_skip_cfs(depl_cmdline, booted_cmdline)
# 484 | | && compare_cmdline_skip_cfs(booted_cmdline, depl_cmdline);
# | |_________________________________________________________________^
# |
# = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_return
# help: remove `return`
# |
# 483 ~ compare_cmdline_skip_cfs(depl_cmdline, booted_cmdline)
# 484 ~ && compare_cmdline_skip_cfs(booted_cmdline, depl_cmdline)
# |
Error: CLIPPY_WARNING:
crates/lib/src/bootc_composefs/update.rs:97:5: warning: doc list item overindented
# |
# 97 | /// /run/composefs/staged-deployment which is the last thing we create while upgrading
# | ^^^ help: try using ` ` (2 spaces)
# |
# = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#doc_overindented_list_items
# = note: `#[warn(clippy::doc_overindented_list_items)]` on by default
Error: CLIPPY_WARNING:
crates/lib/src/bootc_composefs/update.rs:102:5: warning: doc list item overindented
# |
# 102 | /// point
# | ^^^ help: try using ` ` (2 spaces)
# |
# = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#doc_overindented_list_items
Error: CLIPPY_WARNING:
crates/lib/src/bootc_composefs/update.rs:107:5: warning: doc list item overindented
# |
# 107 | /// was created, or at any other point in time, or it's a new one.
# | ^^^ help: try using ` ` (2 spaces)
# |
# = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#doc_overindented_list_items
Error: CLIPPY_WARNING:
crates/lib/src/bootc_composefs/update.rs:108:5: warning: doc list item overindented
# |
# 108 | /// Any which way, we can overwrite everything
# | ^^^ help: try using ` ` (2 spaces)
# |
# = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#doc_overindented_list_items
Error: CLIPPY_WARNING:
crates/lib/src/bootc_composefs/update.rs:225:23: warning: using `.iter().next()` on an array
# |
# 225 | let Some(entry) = entries.iter().next() else {
# | ^^^^^^^^^^^^^^^^^^^^^ help: try calling: `entries.first()`
# |
# = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#iter_next_slice
Error: CLIPPY_WARNING:
crates/lib/src/bootc_composefs/update.rs:407:34: warning: deref which would be done by auto-deref
# |
# 407 | get_imginfo(storage, &*composefs.cmdline.digest, Some(booted_imgref)).await?;
# | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&composefs.cmdline.digest`
# |
# = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#explicit_auto_deref
Error: CLIPPY_WARNING:
crates/lib/src/cli.rs:1149:5: warning: unneeded `return` statement
# |
# 1149 | return Ok(target);
# | ^^^^^^^^^^^^^^^^^
# |
# = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_return
# help: remove `return`
# |
# 1149 - return Ok(target);
# 1149 + Ok(target)
# |
Error: CLIPPY_WARNING:
crates/lib/src/deploy.rs:785:13: warning: field assignment outside of initializer for an instance created with Default::default()
# |
# 785 | opts.locked = lock_finalization;
# | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
# |
# note: consider initializing the variable with `SysrootDeployTreeOpts::<'_> { locked: lock_finalization, ..Default::default() }` and removing relevant reassignments
# --> crates/lib/src/deploy.rs:782:13
# |
# 782 | let mut opts = ostree::SysrootDeployTreeOpts::default();
# | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
# = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#field_reassign_with_default
# = note: `#[warn(clippy::field_reassign_with_default)]` on by default
Error: CLIPPY_WARNING:
crates/lib/src/image.rs:188:5: warning: unneeded `return` statement
# |
# 188 | return Ok((src_imgref, dest_imgref));
# | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
# |
# = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_return
# help: remove `return`
# |
# 188 - return Ok((src_imgref, dest_imgref));
# 188 + Ok((src_imgref, dest_imgref))
# |
Error: CLIPPY_WARNING:
crates/lib/src/install.rs:668:16: warning: inequality checks against false are unnecessary
# |
# 668 | if self.composefs_opts.insecure != false {
# | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.composefs_opts.insecure`
# |
# = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#bool_comparison
# = note: `#[warn(clippy::bool_comparison)]` on by default
Error: CLIPPY_WARNING:
crates/lib/src/install.rs:1558:20: warning: this `else { if .. }` block can be collapsed
# |
# 1558 | } else {
# | ____________________^
# 1559 | | if crate::bootloader::supports_bootupd(d)? {
# 1560 | | crate::spec::Bootloader::Grub
# 1561 | | } else {
# ... |
# 1564 | | }
# | |_____________^
# |
# = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#collapsible_else_if
# = note: `#[warn(clippy::collapsible_else_if)]` on by default
# help: collapse nested if block
# |
# 1558 ~ } else if crate::bootloader::supports_bootupd(d)? {
# 1559 + crate::spec::Bootloader::Grub
# 1560 + } else {
# 1561 + crate::spec::Bootloader::Systemd
# 1562 + }
# |
Error: CLIPPY_WARNING:
crates/lib/src/install.rs:1782:24: warning: called `.as_ref().map(|s| s.as_str())` on an `Option` value
# |
# 1782 | let source_image = opts
# | ________________________^
# 1783 | | .source_opts
# 1784 | | .source_imgref
# 1785 | | .as_ref()
# 1786 | | .map(|s| s.as_str())
# | |____________________________^
# |
# = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#option_as_ref_deref
# = note: `#[warn(clippy::option_as_ref_deref)]` on by default
# help: consider using as_deref
# |
# 1782 ~ let source_image = opts
# 1783 + .source_opts
# 1784 + .source_imgref.as_deref()
# |
Error: CLIPPY_WARNING:
crates/lib/src/install.rs:2109:24: warning: called `.as_ref().map(|s| s.as_str())` on an `Option` value
# |
# 2109 | let source_image = opts
# | ________________________^
# 2110 | | .source_opts
# 2111 | | .source_imgref
# 2112 | | .as_ref()
# 2113 | | .map(|s| s.as_str())
# | |____________________________^
# |
# = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#option_as_ref_deref
# help: consider using as_deref
# |
# 2109 ~ let source_image = opts
# 2110 + .source_opts
# 2111 + .source_imgref.as_deref()
# |
Error: CLIPPY_WARNING:
crates/lib/src/install.rs:2392:24: warning: called `.as_ref().map(|s| s.as_str())` on an `Option` value
# |
# 2392 | let source_image = opts
# | ________________________^
# 2393 | | .source_opts
# 2394 | | .source_imgref
# 2395 | | .as_ref()
# 2396 | | .map(|s| s.as_str())
# | |____________________________^
# |
# = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#option_as_ref_deref
# help: consider using as_deref
# |
# 2392 ~ let source_image = opts
# 2393 + .source_opts
# 2394 + .source_imgref.as_deref()
# |
Error: CLIPPY_WARNING:
crates/lib/src/lints.rs:773:43: warning: useless conversion to the same type: `cap_std_ext::cap_std::fs::ReadDir`
# |
# 773 | let entries: Result<BTreeSet<_>, _> = d
# | ___________________________________________^
# 774 | | .entries()?
# 775 | | .into_iter()
# | |____________________^
# |
# = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#useless_conversion
# help: consider removing `.into_iter()`
# |
# 773 ~ let entries: Result<BTreeSet<_>, _> = d
# 774 + .entries()?
# |
Error: CLIPPY_WARNING:
crates/lib/src/parsers/bls_config.rs:20:5: warning: name `EFI` contains a capitalized acronym
# |
# 20 | EFI {
# | ^^^ help: consider making the acronym lowercase, except the initial letter (notice the capitalization): `Efi`
# |
# = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#upper_case_acronyms
# = note: `#[warn(clippy::upper_case_acronyms)]` on by default
Error: CLIPPY_WARNING:
crates/lib/src/parsers/bls_config.rs:176:46: warning: called `Iterator::last` on a `DoubleEndedIterator`; this will needlessly iterate the entire iterator
# |
# 176 | BLSConfigType::EFI { efi } => Ok(efi
# | ______________________________________________^
# 177 | | .components()
# 178 | | .last()
# | |__________________-----^
# | |
# | help: try: `next_back()`
# |
# = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#double_ended_iterator_last
Error: CLIPPY_WARNING:
crates/lib/src/parsers/grub_menuconfig.rs:109:12: warning: called `Iterator::last` on a `DoubleEndedIterator`; this will needlessly iterate the entire iterator
# |
# 109 | Ok(to_path
# | ____________^
# 110 | | .components()
# 111 | | .last()
# | |______________-----^
# | |
# | help: try: `next_back()`
# |
# = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#double_ended_iterator_last
Error: CLIPPY_WARNING:
crates/lib/src/parsers/grub_menuconfig.rs:134:22: warning: redundant guard
# |
# 134 | c if c == '\\' => {
# | ^^^^^^^^^
# |
# = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#redundant_guards
# = note: `#[warn(clippy::redundant_guards)]` on by default
# help: try
# |
# 134 - c if c == '\\' => {
# 134 + '\\' => {
# |
Error: CLIPPY_WARNING:
crates/lib/src/podstorage.rs:159:35: warning: the following explicit lifetimes could be elided: 'c
# |
# 159 | pub fn set_additional_image_store<'c>(
# | ^^
# 160 | cmd: &'c mut Command,
# | ^^
# 161 | ais: impl AsRef<Utf8Path>,
# 162 | ) -> &'c mut Command {
# | ^^
# |
# = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_lifetimes
# = note: `#[warn(clippy::needless_lifetimes)]` on by default
# help: elide the lifetimes
# |
# 159 ~ pub fn set_additional_image_store(
# 160 ~ cmd: &mut Command,
# 161 | ais: impl AsRef<Utf8Path>,
# 162 ~ ) -> &mut Command {
# |
Error: CLIPPY_WARNING:
crates/lib/src/utils.rs:247:13: warning: unneeded `return` statement
# |
# 247 | return Ok(loader);
# | ^^^^^^^^^^^^^^^^^
# |
# = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_return
# help: remove `return`
# |
# 247 - return Ok(loader);
# 247 + Ok(loader)
# |
Error: CLIPPY_WARNING:
crates/lib/src/utils.rs:251:13: warning: unneeded `return` statement
# |
# 251 | return Err(EfiError::MissingVar);
# | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
# |
# = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_return
# help: remove `return`
# |
# 251 - return Err(EfiError::MissingVar);
# 251 + Err(EfiError::MissingVar)
# |
Error: CLIPPY_WARNING:
crates/lib/src/utils.rs:271:14: warning: this `repeat().take()` can be written more concisely
# |
# 271 | 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/rust-1.92.0/index.html#manual_repeat_n
# = note: `#[warn(clippy::manual_repeat_n)]` on by default
Error: CLIPPY_WARNING:
crates/lib/src/utils.rs:277:5: warning: unneeded `return` statement
# |
# 277 | return Ok(final_path);
# | ^^^^^^^^^^^^^^^^^^^^^
# |
# = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_return
# help: remove `return`
# |
# 277 - return Ok(final_path);
# 277 + Ok(final_path)
# |
Error: CLIPPY_WARNING:
crates/ostree-ext/src/cli.rs:797:9: warning: this `if` statement can be collapsed
# |
# 797 | / if let Some(ordered) = raw.ordered {
# 798 | | if ordered {
# 799 | | return Err(anyhow::anyhow!("Ordered mapping not currently supported."));
# 800 | | }
# 801 | | }
# | |_________^
# |
# = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#collapsible_if
# = note: `#[warn(clippy::collapsible_if)]` on by default
# help: collapse nested if block
# |
# 797 ~ if let Some(ordered) = raw.ordered
# 798 ~ && ordered {
# 799 | return Err(anyhow::anyhow!("Ordered mapping not currently supported."));
# 800 ~ }
# |
Error: CLIPPY_WARNING:
crates/ostree-ext/src/container/store.rs:485:9: warning: this `if` statement can be collapsed
# |
# 485 | / if let Some(meta) = root.symlink_metadata_optional(ent)? {
# 486 | | if meta.is_file() && meta.size() == 0 {
# 487 | | tracing::debug!("Removing {ent}");
# 488 | | root.remove_file(ent)?;
# 489 | | }
# 490 | | }
# | |_________^
# |
# = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#collapsible_if
# help: collapse nested if block
# |
# 485 ~ if let Some(meta) = root.symlink_metadata_optional(ent)?
# 486 ~ && meta.is_file() && meta.size() == 0 {
# 487 | tracing::debug!("Removing {ent}");
# 488 | root.remove_file(ent)?;
# 489 ~ }
# |
Error: CLIPPY_WARNING:
crates/ostree-ext/src/container/store.rs:949:5: warning: this function has too many arguments (10/7)
# |
# 949 | / fn write_merge_commit_impl(
# 950 | | repo: &ostree::Repo,
# 951 | | base_commit: Option<&str>,
# 952 | | layer_commits: &[String],
# ... |
# 959 | | cancellable: Option<&gio::Cancellable>,
# 960 | | ) -> Result<Box<LayeredImageState>> {
# | |_______________________________________^
# |
# = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#too_many_arguments
# = note: `#[warn(clippy::too_many_arguments)]` on by default
Error: CLIPPY_WARNING:
crates/ostree-ext/src/container/store.rs:1048:22: warning: derefed type is same as origin
# |
# 1048 | let parent = base_commit.as_deref();
# | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `base_commit`
# |
# = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_option_as_deref
# = note: `#[warn(clippy::needless_option_as_deref)]` on by default
Error: CLIPPY_WARNING:
crates/ostree-ext/src/container/store.rs:1588:36: warning: using `clone` on type `Option<&History>` which implements the `Copy` trait
# |
# 1588 | let previous_description = history_entry
# | ____________________________________^
# 1589 | | .clone()
# | |____________________^ help: try removing the `clone` call: `history_entry`
# |
# = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#clone_on_copy
# = note: `#[warn(clippy::clone_on_copy)]` on by default
Error: CLIPPY_WARNING:
crates/ostree-ext/src/container/unencapsulate.rs:224:13: warning: this `if` statement can be collapsed
# |
# 224 | / if transport_src == Transport::DockerDaemon {
# 225 | | if let oci_image::MediaType::Other(t) = &media_type {
# 226 | | if t.as_str() == "application/vnd.docker.image.rootfs.diff.tar.gzip" {
# 227 | | media_type = oci_image::MediaType::Other(
# ... |
# 232 | | }
# | |_____________^
# |
# = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#collapsible_if
# help: collapse nested if block
# |
# 224 ~ if transport_src == Transport::DockerDaemon
# 225 ~ && let oci_image::MediaType::Other(t) = &media_type {
# 226 | if t.as_str() == "application/vnd.docker.image.rootfs.diff.tar.gzip" {
# ...
# 230 | }
# 231 ~ }
# |
Error: CLIPPY_WARNING:
crates/ostree-ext/src/container/unencapsulate.rs:225:17: warning: this `if` statement can be collapsed
# |
# 225 | / if let oci_image::MediaType::Other(t) = &media_type {
# 226 | | if t.as_str() == "application/vnd.docker.image.rootfs.diff.tar.gzip" {
# 227 | | media_type = oci_image::MediaType::Other(
# 228 | | "application/vnd.docker.image.rootfs.diff.tar".to_string(),
# ... |
# 231 | | }
# | |_________________^
# |
# = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#collapsible_if
# help: collapse nested if block
# |
# 225 ~ if let oci_image::MediaType::Other(t) = &media_type
# 226 ~ && t.as_str() == "application/vnd.docker.image.rootfs.diff.tar.gzip" {
# 227 | media_type = oci_image::MediaType::Other(
# 228 | "application/vnd.docker.image.rootfs.diff.tar".to_string(),
# 229 | );
# 230 ~ }
# |
Error: CLIPPY_WARNING:
crates/ostree-ext/src/logging.rs:24:5: warning: this `if` statement can be collapsed
# |
# 24 | / if let Err(e) = libsystemd::logging::journal_send(priority, msg, vars) {
# 25 | | if !EMITTED_JOURNAL_ERROR.swap(true, Ordering::SeqCst) {
# 26 | | eprintln!("failed to write to journal: {e}");
# 27 | | }
# 28 | | }
# | |_____^
# |
# = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#collapsible_if
# help: collapse nested if block
# |
# 24 ~ if let Err(e) = libsystemd::logging::journal_send(priority, msg, vars)
# 25 ~ && !EMITTED_JOURNAL_ERROR.swap(true, Ordering::SeqCst) {
# 26 | eprintln!("failed to write to journal: {e}");
# 27 ~ }
# |
Error: CLIPPY_WARNING:
crates/ostree-ext/src/ostree_prepareroot.rs:105:1: warning: this `impl` can be derived
# |
# 105 | / impl Default for Tristate {
# 106 | | fn default() -> Self {
# 107 | | Self::Disabled
# 108 | | }
# 109 | | }
# | |_^
# |
# = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#derivable_impls
# = note: `#[warn(clippy::derivable_impls)]` on by default
# help: replace the manual implementation with a derive attribute and mark the default variant
# |
# 81 + #[derive(Default)]
# 82 | pub enum Tristate {
# 83 | /// Enabled
# 84 | Enabled,
# 85 | /// Disabled
# 86 ~ #[default]
# 87 ~ Disabled,
# |
Error: CLIPPY_WARNING:
crates/ostree-ext/src/sysroot.rs:107:5: warning: this `let...else` may be rewritten with the `?` operator
# |
# 107 | / let Some(statename) = name.strip_prefix(AUTO_STATEROOT_PREFIX) else {
# 108 | | return None;
# 109 | | };
# | |______^ help: replace it with: `let statename = name.strip_prefix(AUTO_STATEROOT_PREFIX)?;`
# |
# = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#question_mark
# = note: `#[warn(clippy::question_mark)]` on by default
Error: CLIPPY_WARNING:
crates/ostree-ext/src/sysroot.rs:110:5: warning: this `let...else` may be rewritten with the `?` operator
# |
# 110 | / let Some((year, serial)) = statename.split_once("-") else {
# 111 | | return None;
# 112 | | };
# | |______^ help: replace it with: `let (year, serial) = statename.split_once("-")?;`
# |
# = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#question_mark
Error: CLIPPY_WARNING:
crates/tests-integration/src/container.rs:53:5: warning: matching on `Some` with `ok()` is redundant
# |
# 53 | if let Some(variant) = std::env::var("BOOTC_variant").ok() {
# | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
# |
# = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#match_result_ok
# = note: `#[warn(clippy::match_result_ok)]` on by default
# help: consider matching on `Ok(variant)` and removing the call to `ok` instead
# |
# 53 - if let Some(variant) = std::env::var("BOOTC_variant").ok() {
# 53 + if let Ok(variant) = std::env::var("BOOTC_variant") {
# |
Error: CLIPPY_WARNING:
crates/tests-integration/src/container.rs:158:5: warning: matching on `Some` with `ok()` is redundant
# |
# 158 | if let Some(variant) = std::env::var("BOOTC_variant").ok() {
# | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
# |
# = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#match_result_ok
# help: consider matching on `Ok(variant)` and removing the call to `ok` instead
# |
# 158 - if let Some(variant) = std::env::var("BOOTC_variant").ok() {
# 158 + if let Ok(variant) = std::env::var("BOOTC_variant") {
# |
Error: CLIPPY_WARNING:
crates/tests-integration/src/container.rs:171:5: warning: matching on `Some` with `ok()` is redundant
# |
# 171 | if let Some(base) = std::env::var("BOOTC_base").ok() {
# | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
# |
# = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#match_result_ok
# help: consider matching on `Ok(base)` and removing the call to `ok` instead
# |
# 171 - if let Some(base) = std::env::var("BOOTC_base").ok() {
# 171 + if let Ok(base) = std::env::var("BOOTC_base") {
# |
Error: CLIPPY_WARNING:
crates/tests-integration/src/container.rs:220:9: warning: needless call to `as_bytes`
# |
# 220 | digest.as_bytes().len(),
# | ^^^^^^^^^^^^^^^^^^^^^^^ help: `len()` can be called directly on strings: `digest.len()`
# |
# = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_as_bytes
# = note: `#[warn(clippy::needless_as_bytes)]` on by default
Error: CLIPPY_WARNING:
crates/tests-integration/src/container.rs:223:9: warning: needless call to `as_bytes`
# |
# 223 | digest.as_bytes().len()
# | ^^^^^^^^^^^^^^^^^^^^^^^ help: `len()` can be called directly on strings: `digest.len()`
# |
# = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#needless_as_bytes
Error: CLIPPY_WARNING:
crates/tmpfiles/src/lib.rs:86:5: warning: this `if` statement can be collapsed
# |
# 86 | / if let Ok(s) = path.as_os_str().as_str() {
# 87 | | if s.chars().all(|c| c.is_ascii_alphanumeric() || c == '/') {
# 88 | | return write!(out, "{s}");
# 89 | | }
# 90 | | }
# | |_____^
# |
# = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#collapsible_if
# = note: `#[warn(clippy::collapsible_if)]` on by default
# help: collapse nested if block
# |
# 86 ~ if let Ok(s) = path.as_os_str().as_str()
# 87 ~ && s.chars().all(|c| c.is_ascii_alphanumeric() || c == '/') {
# 88 | return write!(out, "{s}");
# 89 ~ }
# |
Error: CLIPPY_WARNING:
crates/tmpfiles/src/lib.rs:252:5: warning: this `if` statement can be collapsed
# |
# 252 | / if let Some(meta) = rootfs.symlink_metadata_optional("var/run")? {
# 253 | | if !meta.is_symlink() {
# 254 | | return Err(Error::FoundVarRunNonSymlink {});
# 255 | | }
# 256 | | }
# | |_____^
# |
# = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#collapsible_if
# help: collapse nested if block
# |
# 252 ~ if let Some(meta) = rootfs.symlink_metadata_optional("var/run")?
# 253 ~ && !meta.is_symlink() {
# 254 | return Err(Error::FoundVarRunNonSymlink {});
# 255 ~ }
# |
Error: CLIPPY_WARNING:
crates/tmpfiles/src/lib.rs:477:9: warning: this `if` statement can be collapsed
# |
# 477 | / if let Ok(s) = stem.as_str() {
# 478 | | if s.starts_with(BOOTC_GENERATED_PREFIX) {
# 479 | | generation.increment();
# 480 | | }
# 481 | | }
# | |_________^
# |
# = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#collapsible_if
# help: collapse nested if block
# |
# 477 ~ if let Ok(s) = stem.as_str()
# 478 ~ && s.starts_with(BOOTC_GENERATED_PREFIX) {
# 479 | generation.increment();
# 480 ~ }
# |
Error: CLIPPY_WARNING:
crates/utils/src/path.rs:24:9: warning: this `if` statement can be collapsed
# |
# 24 | / if let Some(s) = self.path.to_str() {
# 25 | | if s.chars().all(is_shellsafe) {
# 26 | | return f.write_str(s);
# 27 | | }
# 28 | | }
# | |_________^
# |
# = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#collapsible_if
# = note: `#[warn(clippy::collapsible_if)]` on by default
# help: collapse nested if block
# |
# 24 ~ if let Some(s) = self.path.to_str()
# 25 ~ && s.chars().all(is_shellsafe) {
# 26 | return f.write_str(s);
# 27 ~ }
# |
Error: CLIPPY_WARNING:
crates/xtask/src/man.rs:309:13: warning: returning the result of a `let` binding from a block
# |
# 308 | let path = find_command_path_for_filename(cli_structure, cmd_part);
# | ------------------------------------------------------------------- unnecessary `let` binding
# 309 | path
# | ^^^^
# |
# = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#let_and_return
# = note: `#[warn(clippy::let_and_return)]` on by default
# help: return the expression directly
# |
# 308 ~
# 309 ~ find_command_path_for_filename(cli_structure, cmd_part)
# |
Error: CLIPPY_WARNING:
crates/xtask/src/man.rs:606:5: warning: empty string literal in `println!`
# |
# 606 | println!("");
# | ^^^^^^^^^--^
# | |
# | help: remove the empty string
# |
# = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#println_empty_string
# = note: `#[warn(clippy::println_empty_string)]` on by default
Error: CLIPPY_WARNING:
crates/xtask/src/man.rs:622:12: warning: this `map_or` can be simplified
# |
# 622 | if path
# | ____________^
# 623 | | .extension()
# 624 | | .and_then(|s| s.to_str())
# 625 | | .map_or(false, |e| e.chars().all(|c| c.is_numeric()))
# | |_________________________________________________________________^
# |
# = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#unnecessary_map_or
# = note: `#[warn(clippy::unnecessary_map_or)]` on by default
# help: use is_some_and instead
# |
# 625 - .map_or(false, |e| e.chars().all(|c| c.is_numeric()))
# 625 + .is_some_and(|e| e.chars().all(|c| c.is_numeric()))
# |
Error: CLIPPY_WARNING:
crates/xtask/src/tmt.rs:172:9: warning: this `if` statement can be collapsed
# |
# 172 | / if let Ok(json_output) = cmd!(sh, "bcvk libvirt inspect {vm_name} --format=json")
# 173 | | .ignore_stderr()
# 174 | | .read()
# ... |
# 185 | | }
# | |_________^
# |
# = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#collapsible_if
# = note: `#[warn(clippy::collapsible_if)]` on by default
# help: collapse nested if block
# |
# 174 ~ .read()
# 175 ~ && let Ok(json) = serde_json::from_str::<serde_json::Value>(&json_output) {
# 176 | if let (Some(ssh_port), Some(ssh_key)) = (
# ...
# 182 | }
# 183 ~ }
# |
Error: CLIPPY_WARNING:
crates/xtask/src/tmt.rs:176:13: warning: this `if` statement can be collapsed
# |
# 176 | / if let Ok(json) = serde_json::from_str::<serde_json::Value>(&json_output) {
# 177 | | if let (Some(ssh_port), Some(ssh_key)) = (
# 178 | | json.get("ssh_port").and_then(|v| v.as_u64()),
# 179 | | json.get("ssh_private_key").and_then(|v| v.as_str()),
# ... |
# 184 | | }
# | |_____________^
# |
# = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#collapsible_if
# help: collapse nested if block
# |
# 176 ~ if let Ok(json) = serde_json::from_str::<serde_json::Value>(&json_output)
# 177 ~ && let (Some(ssh_port), Some(ssh_key)) = (
# 178 | json.get("ssh_port").and_then(|v| v.as_u64()),
# ...
# 182 | return Ok((ssh_port, ssh_key.to_string()));
# 183 ~ }
# |
Error: CLIPPY_WARNING:
crates/xtask/src/tmt.rs:266:9: warning: this `if` statement can be collapsed
# |
# 266 | / if let Some(try_bind) = plan_data.get(&serde_yaml::Value::String(format!(
# 267 | | "extra-{}",
# 268 | | FIELD_TRY_BIND_STORAGE
# 269 | | ))) {
# ... |
# 273 | | }
# | |_________^
# |
# = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#collapsible_if
# help: collapse nested if block
# |
# 269 ~ )))
# 270 ~ && let Some(b) = try_bind.as_bool() {
# 271 | plan_metadata.insert(plan_name.to_string(), b);
# 272 ~ }
# |
Error: CLIPPY_WARNING:
crates/xtask/src/tmt.rs:299:32: warning: useless use of `format!`
# |
# 299 | .chain(std::iter::once(format!("--context=running_env=image_mode")))
# | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"--context=running_env=image_mode".to_string()`
# |
# = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#useless_format
# = note: `#[warn(clippy::useless_format)]` on by default
Error: CLIPPY_WARNING:
crates/xtask/src/tmt.rs:332:26: warning: useless use of `format!`
# |
# 332 | .with_context(|| format!("Saving container image to tar"))?;
# | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Saving container image to tar".to_string()`
# |
# = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#useless_format
Error: CLIPPY_WARNING:
crates/xtask/src/tmt.rs:428:13: warning: this `if` statement can be collapsed
# |
# 428 | / if variant_id == "coreos" {
# 429 | | if distro.starts_with("fedora") {
# 430 | | opts.push("--filesystem=xfs".to_string());
# 431 | | }
# 432 | | }
# | |_____________^
# |
# = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#collapsible_if
# help: collapse nested if block
# |
# 428 ~ if variant_id == "coreos"
# 429 ~ && distro.starts_with("fedora") {
# 430 | opts.push("--filesystem=xfs".to_string());
# 431 ~ }
# |
Error: CLIPPY_WARNING:
crates/xtask/src/tmt.rs:977:5: warning: calling `push_str()` using a single-character string literal
# |
# 977 | tests_content.push_str("\n");
# | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `tests_content.push('\n')`
# |
# = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#single_char_add_str
# = note: `#[warn(clippy::single_char_add_str)]` on by default
Error: CLIPPY_WARNING:
crates/xtask/src/tmt.rs:1000:9: warning: this `if` statement can be collapsed
# |
# 1000 | / if let serde_yaml::Value::Mapping(map) = &test.tmt {
# 1001 | | if let Some(summary) = map.get(&serde_yaml::Value::String(FIELD_SUMMARY.to_string())) {
# 1002 | | plan_value.insert(
# 1003 | | serde_yaml::Value::String(FIELD_SUMMARY.to_string()),
# ... |
# 1007 | | }
# | |_________^
# |
# = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#collapsible_if
# help: collapse nested if block
# |
# 1000 ~ if let serde_yaml::Value::Mapping(map) = &test.tmt
# 1001 ~ && let Some(summary) = map.get(&serde_yaml::Value::String(FIELD_SUMMARY.to_string())) {
# 1002 | plan_value.insert(
# ...
# 1005 | );
# 1006 ~ }
# |
Error: CLIPPY_WARNING:
crates/xtask/src/tmt.rs:1026:9: warning: this `if` statement can be collapsed
# |
# 1026 | / if let serde_yaml::Value::Mapping(map) = &test.tmt {
# 1027 | | if let Some(adjust) = map.get(&serde_yaml::Value::String(FIELD_ADJUST.to_string())) {
# 1028 | | plan_value.insert(
# 1029 | | serde_yaml::Value::String(FIELD_ADJUST.to_string()),
# ... |
# 1033 | | }
# | |_________^
# |
# = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#collapsible_if
# help: collapse nested if block
# |
# 1026 ~ if let serde_yaml::Value::Mapping(map) = &test.tmt
# 1027 ~ && let Some(adjust) = map.get(&serde_yaml::Value::String(FIELD_ADJUST.to_string())) {
# 1028 | plan_value.insert(
# ...
# 1031 | );
# 1032 ~ }
# |
Error: CLIPPY_WARNING:
crates/xtask/src/xtask.rs:121:9: warning: this `if` statement can be collapsed
# |
# 121 | / if let Ok(toplevel_path) = Command::new("git")
# 122 | | .args(["rev-parse", "--show-toplevel"])
# 123 | | .output()
# ... |
# 129 | | }
# | |_________^
# |
# = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#collapsible_if
# help: collapse nested if block
# |
# 123 ~ .output()
# 124 ~ && toplevel_path.status.success() {
# 125 | let path = String::from_utf8(toplevel_path.stdout)?;
# 126 | std::env::set_current_dir(path.trim()).context("Changing to toplevel")?;
# 127 ~ }
# |
Error: CLIPPY_WARNING:
crates/xtask/src/xtask.rs:314:13: warning: this `if` statement can be collapsed
# |
# 314 | / if let Some(name) = name.to_str() {
# 315 | | if name.ends_with(".src.rpm") {
# 316 | | sh.remove_path(name)?;
# 317 | | }
# 318 | | }
# | |_____________^
# |
# = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#collapsible_if
# help: collapse nested if block
# |
# 314 ~ if let Some(name) = name.to_str()
# 315 ~ && name.ends_with(".src.rpm") {
# 316 | sh.remove_path(name)?;
# 317 ~ }
# |