commit a042e1b1e19bbb9ae2afe7ae0841e804f08eace3
parent 6ac28a0879780a7881e6d3e1eaee8f99e94aa2fc
Author: Drew DeVault <sir@cmpwn.com>
Date: Fri, 26 Mar 2021 16:48:40 -0400
cmd/hare: fix lingering promotion issue
This seems to work now, probably due to some harec improvements as of
late.
Diffstat:
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/cmd/hare/schedule.ha b/cmd/hare/schedule.ha
@@ -23,8 +23,7 @@ fn ident_hash(ident: ast::ident) u32 = {
fn sched_module(plan: *plan, ident: ast::ident, link: *[]*task) *task = {
let hash = ident_hash(ident);
// TODO: We should not have to dereference the bucket for len or append
- // TODO: We should not have to cast the length to u32
- let bucket = &plan.modmap[hash % len(plan.modmap): u32];
+ let bucket = &plan.modmap[hash % len(plan.modmap)];
for (let i = 0z; i < len(*bucket); i += 1) {
if (bucket[i].hash == hash) {
return bucket[i].task;