ksud: make clippy happy
This commit is contained in:
@@ -74,7 +74,7 @@ fn parse_kmi_from_modules() -> Result<String> {
|
|||||||
// find a *.ko in /vendor/lib/modules
|
// find a *.ko in /vendor/lib/modules
|
||||||
let modfile = std::fs::read_dir("/vendor/lib/modules")?
|
let modfile = std::fs::read_dir("/vendor/lib/modules")?
|
||||||
.filter_map(Result::ok)
|
.filter_map(Result::ok)
|
||||||
.find(|entry| entry.path().extension().map_or(false, |ext| ext == "ko"))
|
.find(|entry| entry.path().extension().is_some_and(|ext| ext == "ko"))
|
||||||
.map(|entry| entry.path())
|
.map(|entry| entry.path())
|
||||||
.ok_or_else(|| anyhow!("No kernel module found"))?;
|
.ok_or_else(|| anyhow!("No kernel module found"))?;
|
||||||
let output = Command::new("modinfo").arg(modfile).output()?;
|
let output = Command::new("modinfo").arg(modfile).output()?;
|
||||||
|
|||||||
@@ -167,7 +167,7 @@ enum PolicyStatement<'a> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> SeObjectParser<'a> for NormalPerm<'a> {
|
impl<'a> SeObjectParser<'a> for NormalPerm<'a> {
|
||||||
fn parse(input: &'a str) -> IResult<&str, Self> {
|
fn parse(input: &'a str) -> IResult<&'a str, Self> {
|
||||||
let (input, op) = alt((
|
let (input, op) = alt((
|
||||||
tag("allow"),
|
tag("allow"),
|
||||||
tag("deny"),
|
tag("deny"),
|
||||||
|
|||||||
Reference in New Issue
Block a user