chore(ksud): enable clippy::all, clippy::pedantic && make clippy happy (#617)

* Revert "chore(ksud): bump ksud's deps (#585)"
* Because it may cause compilation errors.

This reverts commit c8020b2066.

* chore(ksud): remove unused Result

Signed-off-by: Tools-app <localhost.hutao@gmail.com>

* chore(ksud): enable clippy::all, clippy::pedantic && make clippy happy

https://rust-lang.github.io/rust-clippy/master/index.html#map_unwrap_or

https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args

https://rust-lang.github.io/rust-clippy/master/index.html#used_underscore_items

https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure_for_method_calls

https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pub_crate
...
and use some #![allow(...)] or #[allow(...)]

Signed-off-by: Tools-app <localhost.hutao@gmail.com>

---------

Signed-off-by: Tools-app <localhost.hutao@gmail.com>
This commit is contained in:
生于生时 亡于亡刻
2025-11-22 06:09:45 +08:00
committed by ShirkNeko
parent 6898d82daf
commit 27f6db889a
20 changed files with 829 additions and 784 deletions

View File

@@ -50,7 +50,7 @@ pub fn list_templates() -> Result<()> {
let template = template.file_name();
if let Some(template) = template.to_str() {
println!("{template}");
};
}
}
Ok(())
}
@@ -71,9 +71,9 @@ pub fn apply_sepolies() -> Result<()> {
};
let sepolicy = sepolicy.path();
if sepolicy::apply_file(&sepolicy).is_ok() {
log::info!("profile sepolicy applied: {sepolicy:?}");
log::info!("profile sepolicy applied: {}", sepolicy.display());
} else {
log::info!("profile sepolicy apply failed: {sepolicy:?}");
log::info!("profile sepolicy apply failed: {}", sepolicy.display());
}
}
Ok(())