Skip to content

Commit

Permalink
Update nightly Rust toolchain for Bazel (TraceMachina#456)
Browse files Browse the repository at this point in the history
  • Loading branch information
jaroeichler authored Dec 8, 2023
1 parent 0c225da commit 5acfa25
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion WORKSPACE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ rust_register_toolchains(
edition = "2021",
versions = [
"1.73.0",
"nightly/2023-07-15",
"nightly/2023-12-07",
],
)

Expand Down
7 changes: 3 additions & 4 deletions native-link-service/src/bytestream_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,11 @@ struct ActiveStreamGuard<'a> {
}

impl<'a> ActiveStreamGuard<'a> {
/// Consumes the guard and returns the inner state. The stream will be considered
/// "finished", will remove it from the active_uploads.
fn graceful_finish(mut self) -> (DropCloserWriteHalf, StoreUpdateFuture) {
/// Consumes the guard. The stream will be considered "finished", will
/// remove it from the active_uploads.
fn graceful_finish(mut self) {
let stream_state = self.stream_state.take().unwrap();
self.bytestream_server.active_uploads.lock().remove(&stream_state.uuid);
(stream_state.tx, stream_state.store_update_fut)
}
}

Expand Down
6 changes: 3 additions & 3 deletions native-link-store/tests/filesystem_store_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ mod filesystem_store_tests {
.into_inner();
let mut read_dir_stream = ReadDirStream::new(temp_dir_handle);

while let Some(temp_dir_entry) = read_dir_stream.next().await {
if let Some(temp_dir_entry) = read_dir_stream.next().await {
let path = temp_dir_entry?.path();
panic!("No files should exist in temp directory, found: {path:?}");
}
Expand Down Expand Up @@ -412,7 +412,7 @@ mod filesystem_store_tests {
.err_tip(|| "Failed opening temp directory")?
.into_inner();
let mut read_dir_stream = ReadDirStream::new(temp_dir_handle);
while let Some(temp_dir_entry) = read_dir_stream.next().await {
if let Some(temp_dir_entry) = read_dir_stream.next().await {
let path = temp_dir_entry?.path();
panic!("No files should exist in temp directory, found: {path:?}");
}
Expand Down Expand Up @@ -509,7 +509,7 @@ mod filesystem_store_tests {
.err_tip(|| "Failed opening temp directory")?
.into_inner();
let mut read_dir_stream = ReadDirStream::new(temp_dir_handle);
while let Some(temp_dir_entry) = read_dir_stream.next().await {
if let Some(temp_dir_entry) = read_dir_stream.next().await {
let path = temp_dir_entry?.path();
panic!("No files should exist in temp directory, found: {:?}", path);
}
Expand Down
2 changes: 1 addition & 1 deletion native-link-util/src/action_messages.rs
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ impl ActionInfo {
.unwrap_or_default()
.try_into()
.map_err(|_| make_input_err!("Failed convert proto duration to system duration"))?,
platform_properties: action.platform.unwrap_or_default().try_into()?,
platform_properties: action.platform.unwrap_or_default().into(),
priority: execute_request.execution_policy.unwrap_or_default().priority,
load_timestamp,
insert_timestamp: queued_timestamp,
Expand Down

0 comments on commit 5acfa25

Please sign in to comment.