ksud: make cargo fmt happy

This commit is contained in:
weishu
2023-10-21 13:21:33 +08:00
parent 9b294682b0
commit fd03626362
3 changed files with 3 additions and 8 deletions

View File

@@ -81,13 +81,10 @@ pub fn get_apk_signature(apk: &str) -> Result<(u32, String)> {
}
if v3_signing_exist || v3_1_signing_exist {
return Err(anyhow::anyhow!(
"Unexpected v3 signature found!",
));
return Err(anyhow::anyhow!("Unexpected v3 signature found!",));
}
v2_signing.ok_or(anyhow::anyhow!("No signature found!"))
}
fn calc_cert_sha256(

View File

@@ -224,9 +224,7 @@ pub fn run() -> Result<()> {
crate::profile::set_sepolicy(package, policy)
}
Profile::GetTemplate { id } => crate::profile::get_template(id),
Profile::SetTemplate { id, template } => {
crate::profile::set_template(id, template)
},
Profile::SetTemplate { id, template } => crate::profile::set_template(id, template),
Profile::DeleteTemplate { id } => crate::profile::delete_template(id),
Profile::ListTemplates => crate::profile::list_templates(),
},

View File

@@ -42,7 +42,7 @@ pub fn delete_template(id: String) -> Result<()> {
pub fn list_templates() -> Result<()> {
let templates = std::fs::read_dir(defs::PROFILE_TEMPLATE_DIR);
let Ok(templates) = templates else {
return Ok(())
return Ok(());
};
for template in templates {
let template = template?;