From 7436e4ff651b64d4019a59d04c30c414ae220403 Mon Sep 17 00:00:00 2001 From: Conrad Ludgate Date: Fri, 22 Apr 2022 21:14:23 +0100 Subject: feature-flags (#328) * use feature flags * fmt * fix features * update ci * fmt Co-authored-by: Ellie Huxtable --- atuin-client/src/encryption.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'atuin-client/src/encryption.rs') diff --git a/atuin-client/src/encryption.rs b/atuin-client/src/encryption.rs index 4746c23e..f805cbd5 100644 --- a/atuin-client/src/encryption.rs +++ b/atuin-client/src/encryption.rs @@ -77,7 +77,7 @@ pub fn encode_key(key: secretbox::Key) -> Result { pub fn decode_key(key: String) -> Result { let buf = base64::decode(key).wrap_err("encryption key is not a valid base64 encoding")?; - let buf: secretbox::Key = rmp_serde::from_read_ref(&buf) + let buf: secretbox::Key = rmp_serde::from_slice(&buf) .wrap_err("encryption key is not a valid message pack encoding")?; Ok(buf) @@ -98,7 +98,7 @@ pub fn decrypt(encrypted_history: &EncryptedHistory, key: &secretbox::Key) -> Re let plaintext = secretbox::open(&encrypted_history.ciphertext, &encrypted_history.nonce, key) .map_err(|_| eyre!("failed to open secretbox - invalid key?"))?; - let history = rmp_serde::from_read_ref(&plaintext)?; + let history = rmp_serde::from_slice(&plaintext)?; Ok(history) } -- cgit v1.3.1