Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion crates/hyperqueue/src/client/output/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -962,7 +962,7 @@ impl Output for CliOutput {

fn print_autoalloc_queues(&self, info: AutoAllocListQueuesResponse) {
let mut queues: Vec<_> = info.queues.into_iter().collect();
queues.sort_unstable_by(|a, b| a.0.cmp(&b.0));
queues.sort_unstable_by_key(|a| a.0);

let rows: Vec<_> = queues
.into_iter()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -330,12 +330,8 @@ fn get_column_constraints(rect: Rect, num_cpus: usize) -> Vec<Constraint> {
let max_columns = (rect.width / CPU_METER_WIDTH as u16) as usize;
let num_columns = cmp::min(max_columns, num_cpus);

if num_columns > 0 {
std::iter::repeat_n(
Constraint::Percentage((100 / num_columns) as u16),
num_columns,
)
.collect()
if let Some(p) = 100usize.checked_div(num_columns) {
std::iter::repeat_n(Constraint::Percentage(p as u16), num_columns).collect()
} else {
vec![]
}
Expand Down
2 changes: 1 addition & 1 deletion crates/tako/src/internal/worker/resources/allocator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ impl ResourceAllocator {
&self.static_info.coupling_weights,
)
.unwrap();
for (entry, group_set) in coupling.into_iter().zip(groups.into_iter()) {
for (entry, group_set) in coupling.into_iter().zip(groups) {
allocation.add_resource_allocation(
self.pools[entry.resource_id].claim_resources_with_group_mask(
entry.resource_id,
Expand Down
Loading