Skip to content

Commit 7f9f2da

Browse files
authored
Fix compile time warnings from rustc version upgrade (TraceMachina#1231)
1 parent 44a4a91 commit 7f9f2da

File tree

5 files changed

+12
-9
lines changed

5 files changed

+12
-9
lines changed

Cargo.toml

+3-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@ debug = false
2929
name = "nativelink"
3030

3131
[features]
32-
enable_tokio_console = []
32+
enable_tokio_console = [
33+
"nativelink-util/enable_tokio_console"
34+
]
3335

3436
[dependencies]
3537
nativelink-error = { path = "nativelink-error" }

nativelink-store/src/dedup_store.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,7 @@ impl StoreDriver for DedupStore {
166166
})
167167
.collect::<FuturesOrdered<_>>()
168168
.try_collect()
169-
.await?;
170-
Ok(())
169+
.await
171170
}
172171

173172
async fn update(

nativelink-store/src/redis_store.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ impl StoreDriver for RedisStore {
275275
}
276276

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

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

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

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

306306
Ok(())

nativelink-store/src/s3_store.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -399,8 +399,7 @@ where
399399
})
400400
.collect::<FuturesUnordered<_>>()
401401
.try_collect()
402-
.await?;
403-
Ok(())
402+
.await
404403
}
405404

406405
async fn update(

nativelink-util/Cargo.toml

+3
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ name = "nativelink-util"
33
version = "0.4.0"
44
edition = "2021"
55

6+
[features]
7+
enable_tokio_console = []
8+
69
[dependencies]
710
nativelink-config = { path = "../nativelink-config" }
811
nativelink-error = { path = "../nativelink-error" }

0 commit comments

Comments
 (0)