Skip to content

Commit

Permalink
Fix compile time warnings from rustc version upgrade (#1231)
Browse files Browse the repository at this point in the history
  • Loading branch information
allada committed Aug 2, 2024
1 parent 44a4a91 commit 7f9f2da
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 9 deletions.
4 changes: 3 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ debug = false
name = "nativelink"

[features]
enable_tokio_console = []
enable_tokio_console = [
"nativelink-util/enable_tokio_console"
]

[dependencies]
nativelink-error = { path = "nativelink-error" }
Expand Down
3 changes: 1 addition & 2 deletions nativelink-store/src/dedup_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,7 @@ impl StoreDriver for DedupStore {
})
.collect::<FuturesOrdered<_>>()
.try_collect()
.await?;
Ok(())
.await
}

async fn update(
Expand Down
8 changes: 4 additions & 4 deletions nativelink-store/src/redis_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ impl StoreDriver for RedisStore {
}

// Queue the append, but don't execute until we've received all the chunks.
pipe.append(&temp_key, chunk)
pipe.append::<(), _, _>(&temp_key, chunk)
.await
.err_tip(|| "Failed to append to temp key in RedisStore::update")?;
expecting_first_chunk = false;
Expand All @@ -287,20 +287,20 @@ impl StoreDriver for RedisStore {

// Here the reader is empty but more data is expected.
// Executing the queued commands appends the data we just received to the temp key.
pipe.all()
pipe.all::<()>()
.await
.err_tip(|| "Failed to append to temporary key in RedisStore::update")?;
}

// Rename the temp key so that the data appears under the real key. Any data already present in the real key is lost.
client
.rename(&temp_key, final_key.as_ref())
.rename::<(), _, _>(&temp_key, final_key.as_ref())
.await
.err_tip(|| "While renaming key in RedisStore::update()")?;

// If we have a publish channel configured, send a notice that the key has been set.
if let Some(pub_sub_channel) = &self.pub_sub_channel {
client.publish(pub_sub_channel, final_key.as_ref()).await?;
return Ok(client.publish(pub_sub_channel, final_key.as_ref()).await?);
};

Ok(())
Expand Down
3 changes: 1 addition & 2 deletions nativelink-store/src/s3_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -399,8 +399,7 @@ where
})
.collect::<FuturesUnordered<_>>()
.try_collect()
.await?;
Ok(())
.await
}

async fn update(
Expand Down
3 changes: 3 additions & 0 deletions nativelink-util/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ name = "nativelink-util"
version = "0.4.0"
edition = "2021"

[features]
enable_tokio_console = []

[dependencies]
nativelink-config = { path = "../nativelink-config" }
nativelink-error = { path = "../nativelink-error" }
Expand Down

0 comments on commit 7f9f2da

Please sign in to comment.