wifictl: fix backend.rs set_mode call split by SAFETY comment
Commit222d5186eb('add minimal # Safety comments to 70 files') inserted a '// SAFETY: ...' line mid-token in backend.rs:1405, splitting 'perms.set_mode(0o755);' into 'perms.set_mo' + comment + 'de(0o755);'. The result is a compilation error that prevents the entire redbear-wifictl crate from building — including the new dbus_nm.rs interface frome65a23fd6b. Restore the single-line call. The Safety rationale is captured by the surrounding cfg(unix) block. Verified: cargo check --features dbus-nm compiles, 35 unit tests + 2 cli_transport pass.
This commit is contained in:
@@ -1402,8 +1402,7 @@ esac
|
||||
{
|
||||
use std::os::unix::fs::PermissionsExt;
|
||||
let mut perms = fs::metadata(&driver).unwrap().permissions();
|
||||
perms.set_mo// SAFETY: caller must verify the safety contract for this operation
|
||||
de(0o755);
|
||||
perms.set_mode(0o755);
|
||||
fs::set_permissions(&driver, perms).unwrap();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user