diff options
Diffstat (limited to 'src/api/core/ciphers.rs')
-rw-r--r-- | src/api/core/ciphers.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/api/core/ciphers.rs b/src/api/core/ciphers.rs index b16ea002..23554820 100644 --- a/src/api/core/ciphers.rs +++ b/src/api/core/ciphers.rs @@ -376,11 +376,11 @@ fn put_cipher_share_seleted(data: JsonUpcase<ShareSelectedCipherData>, headers: let mut data: ShareSelectedCipherData = data.into_inner().data; let mut cipher_ids: Vec<String> = Vec::new(); - if data.Ciphers.len() == 0 { + if data.Ciphers.is_empty() { err!("You must select at least one cipher.") } - if data.CollectionIds.len() == 0 { + if data.CollectionIds.is_empty() { err!("You must select at least one collection.") } @@ -393,7 +393,7 @@ fn put_cipher_share_seleted(data: JsonUpcase<ShareSelectedCipherData>, headers: let attachments = Attachment::find_by_ciphers(cipher_ids, &conn); - if attachments.len() > 0 { + if !attachments.is_empty() { err!("Ciphers should not have any attachments.") } |