xmpp-parsers/caps: Simplify get_hash_vec().

This commit is contained in:
Emmanuel Gil Peyrot 2020-12-24 13:02:53 +01:00 committed by Link Mauve
parent f085b1cbf8
commit 2f570fcabe

View file

@ -158,9 +158,7 @@ pub fn compute_disco(disco: &DiscoInfoResult) -> Vec<u8> {
}
fn get_hash_vec(hash: &[u8]) -> Vec<u8> {
let mut vec = Vec::with_capacity(hash.len());
vec.extend_from_slice(hash);
vec
hash.to_vec()
}
/// Hashes the result of [compute_disco()] with one of the supported [hash