Skip to content

Commit 89b5e88

Browse files
committed
PR Feedback; add an expect for tag() returning None
1 parent 316e314 commit 89b5e88

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

site/src/job_queue.rs

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -182,9 +182,16 @@ fn sort_benchmark_requests(done: &HashSet<String>, request_queue: &mut [Benchmar
182182
)
183183
});
184184
for c in level {
185-
if let Some(tag) = c.tag() {
186-
done.insert(tag.to_string());
187-
}
185+
// As the only `commit_type` that will not have a `tag` is a `Try`
186+
// with the status of `AwaitingArtifacts` and we have asserted above
187+
// that all of the statuses of the benchmark requests are
188+
// `ArtifactsReady` it is implausable for this `expect(...)` to be
189+
// hit.
190+
done.insert(
191+
c.tag()
192+
.expect("Tag should exist on a benchmark request being sorted")
193+
.to_string(),
194+
);
188195
}
189196
finished += level_len;
190197
}

0 commit comments

Comments
 (0)