keyfork-derive-openpgp: use .first() in place of .get(0)

This commit is contained in:
Ryan Heywood 2024-04-14 23:09:24 -04:00
parent 1de466cad0
commit 9f089e723a
Signed by: ryan
GPG Key ID: 8E401478A3FBEF72
1 changed files with 1 additions and 1 deletions

View File

@ -65,7 +65,7 @@ pub type Result<T, E = Error> = std::result::Result<T, E>;
/// # Errors
/// The function may error for any condition mentioned in [`Error`].
pub fn derive(xprv: XPrv, keys: &[KeyFlags], userid: &UserID) -> Result<Cert> {
let primary_key_flags = match keys.get(0) {
let primary_key_flags = match keys.first() {
Some(kf) if kf.for_certification() => kf,
_ => return Err(Error::NotCert),
};