From 327a8d7b8fb927468a18a0eca17fd51b3ff1ddc2 Mon Sep 17 00:00:00 2001 From: BlackDex Date: Wed, 6 Dec 2023 22:08:20 +0100 Subject: [PATCH] Remove useless variable During some refactoring this seems to be overlooked. This variable gets filled but isn't used at all afterwards. Fixes #4105 --- src/api/core/ciphers.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/api/core/ciphers.rs b/src/api/core/ciphers.rs index 2489337e..0410d68e 100644 --- a/src/api/core/ciphers.rs +++ b/src/api/core/ciphers.rs @@ -849,7 +849,6 @@ async fn put_cipher_share_selected( nt: Notify<'_>, ) -> EmptyResult { let mut data: ShareSelectedCipherData = data.into_inner().data; - let mut cipher_ids: Vec = Vec::new(); if data.Ciphers.is_empty() { err!("You must select at least one cipher.") @@ -860,10 +859,9 @@ async fn put_cipher_share_selected( } for cipher in data.Ciphers.iter() { - match cipher.Id { - Some(ref id) => cipher_ids.push(id.to_string()), - None => err!("Request missing ids field"), - }; + if cipher.Id.is_none() { + err!("Request missing ids field") + } } while let Some(cipher) = data.Ciphers.pop() {