fn b64_encoded_into_string()

in src/trace/propagation/decoder.rs [77:85]


fn b64_encoded_into_string(enc: &str) -> crate::Result<String> {
    if let Ok(result) = BASE64_STANDARD.decode(enc) {
        if let Ok(decoded_str) = String::from_utf8(result) {
            return Ok(decoded_str);
        }
    }

    Err(crate::Error::DecodePropagation("failed to decode value."))
}