Task #92550 - added.err

back to task #92550
download
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/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/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/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/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/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: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: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:112:9: warning: this `if` statement can be collapsed
#      |
#  112 | /         if let Ok(toplevel_path) = Command::new("git")
#  113 | |             .args(["rev-parse", "--show-toplevel"])
#  114 | |             .output()
#  ...   |
#  120 | |         }
#      | |_________^
#      |
#      = 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
#      |
#  114 ~             .output()
#  115 ~             && toplevel_path.status.success() {
#  116 |                 let path = String::from_utf8(toplevel_path.stdout)?;
#  117 |                 std::env::set_current_dir(path.trim()).context("Changing to toplevel")?;
#  118 ~             }
#      |

Error: CLIPPY_WARNING:
crates/xtask/src/xtask.rs:304:13: warning: this `if` statement can be collapsed
#      |
#  304 | /             if let Some(name) = name.to_str() {
#  305 | |                 if name.ends_with(".src.rpm") {
#  306 | |                     sh.remove_path(name)?;
#  307 | |                 }
#  308 | |             }
#      | |_____________^
#      |
#      = 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
#      |
#  304 ~             if let Some(name) = name.to_str()
#  305 ~                 && name.ends_with(".src.rpm") {
#  306 |                     sh.remove_path(name)?;
#  307 ~                 }
#      |