diff --git a/lib/src/cli.rs b/lib/src/cli.rs index cb14abfca..61223b6af 100644 --- a/lib/src/cli.rs +++ b/lib/src/cli.rs @@ -293,10 +293,8 @@ pub(crate) async fn prepare_for_write() -> Result<()> { ); } ensure_self_unshared_mount_namespace().await?; - if crate::lsm::selinux_enabled()? { - if !crate::lsm::selinux_ensure_install()? { - tracing::warn!("Do not have install_t capabilities"); - } + if crate::lsm::selinux_enabled()? && !crate::lsm::selinux_ensure_install()? { + tracing::warn!("Do not have install_t capabilities"); } Ok(()) } diff --git a/lib/src/install.rs b/lib/src/install.rs index 9d2ca8589..060444340 100644 --- a/lib/src/install.rs +++ b/lib/src/install.rs @@ -1232,7 +1232,7 @@ struct RootMountInfo { /// Discover how to mount the root filesystem, using existing kernel arguments and information /// about the root mount. fn find_root_args_to_inherit(cmdline: &[&str], root_info: &Filesystem) -> Result { - let cmdline = || cmdline.iter().map(|&s| s); + let cmdline = || cmdline.iter().copied(); let root = crate::kernel::find_first_cmdline_arg(cmdline(), "root"); // If we have a root= karg, then use that let (mount_spec, kargs) = if let Some(root) = root { diff --git a/lib/src/install/baseline.rs b/lib/src/install/baseline.rs index 39cb316a5..e41798290 100644 --- a/lib/src/install/baseline.rs +++ b/lib/src/install/baseline.rs @@ -349,7 +349,7 @@ pub(crate) fn install_create_rootfs( let bootsrc = format!("UUID={boot_uuid}"); let bootarg = format!("boot={bootsrc}"); let boot = MountSpec { - source: bootsrc.into(), + source: bootsrc, target: "/boot".into(), fstype: MountSpec::AUTO.into(), options: Some("ro".into()), diff --git a/xtask/src/xtask.rs b/xtask/src/xtask.rs index 0496b11d1..4a6d35952 100644 --- a/xtask/src/xtask.rs +++ b/xtask/src/xtask.rs @@ -134,7 +134,7 @@ fn man2markdown(sh: &Shell) -> Result<()> { fn git_timestamp(sh: &Shell) -> Result { let ts = cmd!(sh, "git show -s --format=%ct").read()?; let ts = ts.trim().parse::()?; - let ts = chrono::NaiveDateTime::from_timestamp_opt(ts, 0) + let ts = chrono::DateTime::from_timestamp(ts, 0) .ok_or_else(|| anyhow::anyhow!("Failed to parse timestamp"))?; Ok(ts.format("%Y%m%d%H%M").to_string()) }