Skip to content

Commit 10c6274

Browse files
author
Bennett Hardwick
committed
Run clippy
1 parent 190e7f2 commit 10c6274

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

src/crypto/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ where
5050
for index_name in E::protected_indexes().iter() {
5151
if let Some((attr, index)) = target
5252
.attribute_for_index(index_name)
53-
.and_then(|attr| E::index_by_name(index_name).and_then(|index| Some((attr, index))))
53+
.and_then(|attr| E::index_by_name(index_name).map(|index| (attr, index)))
5454
{
5555
let index_term = cipher.compound_index(
5656
&CompoundIndex::new(index),

src/encrypted_table/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ impl EncryptedTable {
104104
where
105105
R: SearchableRecord + DecryptedRecord,
106106
{
107-
QueryBuilder::new(&self)
107+
QueryBuilder::new(self)
108108
}
109109

110110
pub async fn get<T>(&self, pk: &str) -> Result<Option<T>, GetError>

src/encrypted_table/query.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ where
129129
if let Some(index) = T::index_by_name(name.as_str()) {
130130
let mut plaintext = ComposablePlaintext::new(plaintexts[0].clone());
131131

132-
for p in plaintexts[1..].into_iter() {
132+
for p in plaintexts[1..].iter() {
133133
plaintext = plaintext
134134
.try_compose((*p).clone())
135135
.expect("Failed to compose");

tests/query_tests.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use cryptonamo::{traits::DecryptedRecord, Cryptonamo, EncryptedTable, Plaintext};
22
use serial_test::serial;
33
use std::{collections::HashMap, future::Future};
4-
use tokio;
4+
55

66
#[derive(Debug, PartialEq, Cryptonamo)]
77
#[cryptonamo(partition_key = "email")]

0 commit comments

Comments
 (0)