switch-to-configuration-ng: fix clippy errors
Failed to build since Rust 1.97, currently on staging.
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user