[team] Team vaults: rustfmt on the files this change touches

This commit is contained in:
2026-11-17 12:15:18 +01:00
parent e3ede760bd
commit 3bb05bf6f1
8 changed files with 138 additions and 45 deletions
+5 -4
View File
@@ -100,9 +100,8 @@ fn lower_hex(s: &str, len: usize) -> bool {
}
pub(crate) fn pub_key(s: &str) -> Result<[u8; 32], TeamError> {
let k: [u8; 32] = unb64(s)
.and_then(|v| v.try_into().ok())
.ok_or(TeamError::Invalid("pub is not base64 of 32 bytes"))?;
let k: [u8; 32] =
unb64(s).and_then(|v| v.try_into().ok()).ok_or(TeamError::Invalid("pub is not base64 of 32 bytes"))?;
if k == [0; 32] {
return Err(TeamError::Invalid("pub is all zeros"));
}
@@ -176,7 +175,9 @@ impl SignRequest {
return bad("artifact_digest has the wrong length for its format");
}
match self.format {
Format::Cosign => custos_sign::image_ok(&self.image).map_err(|_| TeamError::Invalid("image is not a repository"))?,
Format::Cosign => {
custos_sign::image_ok(&self.image).map_err(|_| TeamError::Invalid("image is not a repository"))?
}
_ if !self.image.is_empty() => return bad("image is for cosign only"),
_ => {}
}