Skip to content

Commit

Permalink
Clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
tustvold committed Oct 11, 2023
1 parent 35149f2 commit ba06277
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions object_store/src/aws/dynamo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ pub(crate) async fn copy_if_not_exists(
let mut previous_lease = None;

loop {
match try_lock(&client, table_name, to.as_ref(), previous_lease.as_ref()).await? {
match try_lock(client, table_name, to.as_ref(), previous_lease.as_ref()).await? {
TryLockResult::Ok(lease) => {
let fut = client.copy_request(from, to, None);
return match tokio::time::timeout_at(lease.timeout().into(), fut).await {
Expand Down Expand Up @@ -133,7 +133,7 @@ async fn try_lock(

let ttl = (Utc::now() + LEASE_TTL).timestamp();
let items = [
("key", AttributeValue::String(&key)),
("key", AttributeValue::String(key)),
("generation", AttributeValue::Number(next_gen)),
("ttl", AttributeValue::Number(ttl as _)),
];
Expand All @@ -154,7 +154,7 @@ async fn try_lock(
let acquire = Instant::now();

let builder = match &s3.config.endpoint {
None => s3.client.post(&format!(
None => s3.client.post(format!(
"https://dynamodb.{}.amazonaws.com",
s3.config.region
)),
Expand Down

0 comments on commit ba06277

Please sign in to comment.