diff --git a/xmpp-parsers/src/caps.rs b/xmpp-parsers/src/caps.rs index 2b5e2fb06864409ae22fcbf729f8cb82ab963775..24f129a24f43cd653cd9c59afaefe485f7b4e3d7 100644 --- a/xmpp-parsers/src/caps.rs +++ b/xmpp-parsers/src/caps.rs @@ -158,9 +158,7 @@ pub fn compute_disco(disco: &DiscoInfoResult) -> Vec { } fn get_hash_vec(hash: &[u8]) -> Vec { - 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