keyfork-derive-openpgp: use .first() in place of .get(0)
This commit is contained in:
parent
5ff5643887
commit
78311fe8c2
|
@ -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),
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue