Skip to content

Commit

Permalink
ksud: make cargo fmt happy
Browse files Browse the repository at this point in the history
  • Loading branch information
tiann committed Oct 21, 2023
1 parent 9b29468 commit fd03626
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
5 changes: 1 addition & 4 deletions userspace/ksud/src/apk_sign.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
4 changes: 1 addition & 3 deletions userspace/ksud/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
},
Expand Down
2 changes: 1 addition & 1 deletion userspace/ksud/src/profile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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?;
Expand Down

0 comments on commit fd03626

Please sign in to comment.