Skip to content

Commit 421ea68

Browse files
committed
clippy and formatting corrections.
1 parent 5e2387f commit 421ea68

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

linera-views/src/backends/dynamo_db.rs

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,10 @@ fn build_key(start_key: &[u8], key: Vec<u8>) -> HashMap<String, AttributeValue>
175175
PARTITION_ATTRIBUTE.to_owned(),
176176
AttributeValue::B(Blob::new(start_key.to_vec())),
177177
),
178-
(KEY_ATTRIBUTE.to_owned(), AttributeValue::B(Blob::new(prefixed_key))),
178+
(
179+
KEY_ATTRIBUTE.to_owned(),
180+
AttributeValue::B(Blob::new(prefixed_key)),
181+
),
179182
]
180183
.into()
181184
}
@@ -193,7 +196,10 @@ fn build_key_value(
193196
PARTITION_ATTRIBUTE.to_owned(),
194197
AttributeValue::B(Blob::new(start_key.to_vec())),
195198
),
196-
(KEY_ATTRIBUTE.to_owned(), AttributeValue::B(Blob::new(prefixed_key))),
199+
(
200+
KEY_ATTRIBUTE.to_owned(),
201+
AttributeValue::B(Blob::new(prefixed_key)),
202+
),
197203
(
198204
VALUE_ATTRIBUTE.to_owned(),
199205
AttributeValue::B(Blob::new(value)),
@@ -617,7 +623,10 @@ impl DynamoDbStoreInternal {
617623
"{PARTITION_ATTRIBUTE} = :partition and begins_with({KEY_ATTRIBUTE}, :prefix)"
618624
))
619625
.expression_attribute_values(":partition", AttributeValue::B(Blob::new(start_key)))
620-
.expression_attribute_values(":prefix", AttributeValue::B(Blob::new(prefixed_key_prefix)))
626+
.expression_attribute_values(
627+
":prefix",
628+
AttributeValue::B(Blob::new(prefixed_key_prefix)),
629+
)
621630
.set_exclusive_start_key(start_key_map)
622631
.send()
623632
.boxed_sync()

linera-views/src/test_utils/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ pub async fn run_reads<S: KeyValueStore>(store: S, key_values: Vec<(Vec<u8>, Vec
176176
store.write_batch(batch).await.unwrap();
177177
for key_prefix in keys
178178
.iter()
179-
.flat_map(|key| (0..key.len()+1).map(|u| &key[..u]))
179+
.flat_map(|key| (0..=key.len()).map(|u| &key[..u]))
180180
{
181181
// Getting the find_keys_by_prefix / find_key_values_by_prefix
182182
let len_prefix = key_prefix.len();

0 commit comments

Comments
 (0)