Fix use of TryFrom<Vec<u8>> in key_exchange

We can directly require the HRTB on `for<'r> TryFrom<&'r [u8]>`.
Eliminates needless to_vec.
This commit is contained in:
François Garillot
2020-09-24 14:31:29 +00:00
parent 288105861d
commit 587ef935a7
4 changed files with 29 additions and 33 deletions
+1 -1
View File
@@ -168,7 +168,7 @@ fn login_first_message_roundtrip() {
let ke1m: Vec<u8> = [&client_nonce[..], &client_e_kp.public()].concat();
let reg = <TripleDH as KeyExchange<sha2::Sha256, crate::keypair::X25519KeyPair>>::KE1Message::try_from(
ke1m[..].to_vec(),
&ke1m[..],
)
.unwrap();
let reg_bytes = reg.to_bytes();