switch-to-configuration-ng: fix clippy errors (#540996)

This commit is contained in:
Alyssa Ross
2026-07-12 19:18:37 +00:00
committed by GitHub
@@ -2001,9 +2001,9 @@ won't take effect until you reboot the system.
// Swap entry disappeared, so turn it off. Can't use "systemctl stop" here because
// systemd has lots of alias units that prevent a stop from actually calling "swapoff".
if *action == Action::DryActivate {
eprintln!("would stop swap device: {}", &device);
eprintln!("would stop swap device: {}", device);
} else {
eprintln!("stopping swap device: {}", &device);
eprintln!("stopping swap device: {}", device);
let c_device = std::ffi::CString::new(device.clone())
.context("failed to convert device to cstring")?;
if unsafe { nix::libc::swapoff(c_device.as_ptr()) } != 0 {