xmpp-parsers/caps: Simplify get_hash_vec().
This commit is contained in:
parent
f085b1cbf8
commit
2f570fcabe
1 changed files with 1 additions and 3 deletions
|
|
@ -158,9 +158,7 @@ pub fn compute_disco(disco: &DiscoInfoResult) -> Vec<u8> {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_hash_vec(hash: &[u8]) -> Vec<u8> {
|
fn get_hash_vec(hash: &[u8]) -> Vec<u8> {
|
||||||
let mut vec = Vec::with_capacity(hash.len());
|
hash.to_vec()
|
||||||
vec.extend_from_slice(hash);
|
|
||||||
vec
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Hashes the result of [compute_disco()] with one of the supported [hash
|
/// Hashes the result of [compute_disco()] with one of the supported [hash
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue