From 78311fe8c21389bae246ada9a6f78464e267d270 Mon Sep 17 00:00:00 2001 From: ryan Date: Sun, 14 Apr 2024 23:09:24 -0400 Subject: [PATCH] keyfork-derive-openpgp: use .first() in place of .get(0) --- crates/derive/keyfork-derive-openpgp/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/derive/keyfork-derive-openpgp/src/lib.rs b/crates/derive/keyfork-derive-openpgp/src/lib.rs index d5633d7..276620b 100644 --- a/crates/derive/keyfork-derive-openpgp/src/lib.rs +++ b/crates/derive/keyfork-derive-openpgp/src/lib.rs @@ -65,7 +65,7 @@ pub type Result = std::result::Result; /// # Errors /// The function may error for any condition mentioned in [`Error`]. pub fn derive(xprv: XPrv, keys: &[KeyFlags], userid: &UserID) -> Result { - 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), };