1
0
Fork 0
mirror of https://github.com/librespot-org/librespot.git synced 2025-10-04 10:19:27 +02:00

Adjust arg types of Credentials::with_blob

... to avoid redundant utf-8 checking
This commit is contained in:
johannesd3 2021-05-26 20:45:22 +02:00
parent d8ec98015c
commit 14c1779056
No known key found for this signature in database
GPG key ID: 8C2739E91D410F75
2 changed files with 13 additions and 8 deletions

View file

@ -129,11 +129,10 @@ impl RequestHandler {
GenericArray::from_slice(iv),
);
cipher.apply_keystream(&mut data);
String::from_utf8(data).unwrap()
data
};
let credentials =
Credentials::with_blob(username.to_string(), &decrypted, &self.config.device_id);
let credentials = Credentials::with_blob(username, &decrypted, &self.config.device_id);
self.tx.send(credentials).unwrap();