chore: update & fmt & clippy

This commit is contained in:
MystiPanda
2024-06-12 10:00:22 +08:00
parent e70249cb2e
commit c698b24e01
18 changed files with 100 additions and 127 deletions
+2 -1
View File
@@ -22,7 +22,8 @@ pub fn grant_permission(core: String) -> anyhow::Result<()> {
#[cfg(target_os = "linux")]
let output = {
let path = path.replace(' ', "\\ "); // 避免路径中有空格
let shell = format!("setcap cap_net_bind_service,cap_net_admin,cap_dac_override=+ep {path}");
let shell =
format!("setcap cap_net_bind_service,cap_net_admin,cap_dac_override=+ep {path}");
let sudo = match Command::new("which").arg("pkexec").output() {
Ok(output) => {