Skip to content

Commit 562f5e8

Browse files
committed
meta: clarify sections and parameters
Signed-off-by: Daniel Maslowski <[email protected]>
1 parent 3c3ae90 commit 562f5e8

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/meta.rs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ impl Display for Meta {
3030
}
3131

3232
static KEY_TO_META: phf::Map<&'static str, Meta> = phf_map! {
33+
// (CS)ME
3334
"8431285d43b0f2a2f520d7cab3d34178" => Meta {
3435
variant: Variant::ME,
3536
version: &["2.0.x.x", "2.1.x.x", "2.2.x.x"],
@@ -90,6 +91,7 @@ static KEY_TO_META: phf::Map<&'static str, Meta> = phf_map! {
9091
variant: Variant::ME,
9192
version: &["16.x.x.x"]
9293
},
94+
// TXE
9395
"bda0b6bb8ca0bf0cac55ac4c4d55e0f2" => Meta {
9496
variant: Variant::TXE,
9597
version: &["1.x.x.x"],
@@ -106,6 +108,7 @@ static KEY_TO_META: phf::Map<&'static str, Meta> = phf_map! {
106108
variant: Variant::TXE,
107109
version: &["3.x.x.x"],
108110
},
111+
// SPS
109112
"be900fef868f770d266b1fc67e887e69" => Meta {
110113
variant: Variant::SPS,
111114
version: &["2.x.x.x"],
@@ -120,7 +123,9 @@ static KEY_TO_META: phf::Map<&'static str, Meta> = phf_map! {
120123
},
121124
};
122125

123-
/// Pass the MD5 hash (hex str) of a manifest signing key (pub key with exponent).
124-
pub fn get_meta_for_key(key: &str) -> Option<&Meta> {
125-
KEY_TO_META.get(key)
126+
/// Get metadata for a given manifest signing key (pub key with exponent).
127+
///
128+
/// * `key_hash` - MD5 hash (hex str) of the key
129+
pub fn get_meta_for_key(key_hash: &str) -> Option<&Meta> {
130+
KEY_TO_META.get(key_hash)
126131
}

0 commit comments

Comments
 (0)