keyfork-derive-path-data: make clippy happy
This commit is contained in:
parent
2aba00c457
commit
91a6b845ba
|
@ -1,3 +1,5 @@
|
||||||
|
#![allow(clippy::unreadable_literal)]
|
||||||
|
|
||||||
use keyfork_derive_util::{DerivationIndex, DerivationPath};
|
use keyfork_derive_util::{DerivationIndex, DerivationPath};
|
||||||
|
|
||||||
pub static OPENPGP: DerivationIndex = DerivationIndex::new_unchecked(7366512, true);
|
pub static OPENPGP: DerivationIndex = DerivationIndex::new_unchecked(7366512, true);
|
||||||
|
@ -19,7 +21,7 @@ impl std::fmt::Display for Target {
|
||||||
/// Determine the closest [`Target`] for the given path. This method is intended to be used by
|
/// Determine the closest [`Target`] for the given path. This method is intended to be used by
|
||||||
/// `keyforkd` to provide an optional textual prompt to what a client is attempting to derive.
|
/// `keyforkd` to provide an optional textual prompt to what a client is attempting to derive.
|
||||||
pub fn guess_target(path: &DerivationPath) -> Option<Target> {
|
pub fn guess_target(path: &DerivationPath) -> Option<Target> {
|
||||||
Some(match Vec::from_iter(path.iter())[..] {
|
Some(match path.iter().collect::<Vec<_>>()[..] {
|
||||||
[t, index] if t == &OPENPGP => Target::OpenPGP(index.clone()),
|
[t, index] if t == &OPENPGP => Target::OpenPGP(index.clone()),
|
||||||
_ => return None,
|
_ => return None,
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue