From 890e6cbc73fee0b98098630da79f8db1cee9e433 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damir=20Jeli=C4=87?= Date: Tue, 15 Sep 2020 17:18:31 +0200 Subject: [PATCH] crypto: Turn an unwrap into a except. --- matrix_sdk_crypto/src/file_encryption/attachments.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/matrix_sdk_crypto/src/file_encryption/attachments.rs b/matrix_sdk_crypto/src/file_encryption/attachments.rs index de9ad6c1..4b6b7ea8 100644 --- a/matrix_sdk_crypto/src/file_encryption/attachments.rs +++ b/matrix_sdk_crypto/src/file_encryption/attachments.rs @@ -133,7 +133,7 @@ impl<'a, R: Read + 'a> AttachmentEncryptor<'a, R> { }; let encoded_iv = encode(iv); - let aes = Aes256Ctr::new_var(&key, &iv).unwrap(); + let aes = Aes256Ctr::new_var(&key, &iv).expect("Cannot create AES encryption object."); AttachmentEncryptor { finished: false,