Fix gemini_srv with more conditional comp

This commit is contained in:
Emi Tatsuo 2020-12-05 09:54:05 -05:00
parent f592ecf73b
commit ae247312f7
Signed by: Emi
GPG key ID: 68FAB2E2E6DFC98B

View file

@ -245,6 +245,7 @@ impl Request {
}
#[allow(clippy::ptr_arg)] // This is a single use function that expects a &String
#[cfg(feature = "scgi_srv")]
/// Attempt to decode a 256 bit hash
///
/// Will attempt to decode first as hexadecimal, and then as base64. If both fail, return
@ -267,6 +268,7 @@ fn hash_decode(hash: &String) -> Option<[u8; 32]> {
}
}
#[cfg(feature = "scgi_srv")]
/// Attempt to decode a hex encoded nibble to u8
///
/// Returns [`None`] if not a valid hex character