From 123c764d45b4d24b7fa58440c16afd5672d0646e Mon Sep 17 00:00:00 2001 From: Agnes Leroy Date: Thu, 3 Oct 2024 09:42:25 +0200 Subject: [PATCH] chore(gpu): do not unwrap in blocks_of, to have the same behavior as the CPU --- tfhe/src/integer/gpu/ciphertext/compressed_ciphertext_list.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tfhe/src/integer/gpu/ciphertext/compressed_ciphertext_list.rs b/tfhe/src/integer/gpu/ciphertext/compressed_ciphertext_list.rs index d4939e9ba..518a57b73 100644 --- a/tfhe/src/integer/gpu/ciphertext/compressed_ciphertext_list.rs +++ b/tfhe/src/integer/gpu/ciphertext/compressed_ciphertext_list.rs @@ -85,8 +85,8 @@ impl CudaCompressedCiphertextList { decomp_key: &CudaDecompressionKey, streams: &CudaStreams, ) -> Option<(CudaRadixCiphertext, DataKind)> { - let preceding_infos = self.info.get(..index).unwrap(); - let current_info = self.info.get(index).copied().unwrap(); + let preceding_infos = self.info.get(..index)?; + let current_info = self.info.get(index).copied()?; let start_block_index: usize = preceding_infos .iter()