avoid use of groups_arr

This commit is contained in:
Motiejus Jakštys 2022-07-06 12:18:53 +03:00
parent 97dde99d5e
commit 86d5c026be

View File

@ -127,9 +127,10 @@ pub fn init(
members[members.len - 1] = user_idx;
try user2groups[user_idx].append(allocator, @intCast(u32, i));
} else {
const name = groups.get(i).name;
return err.returnf(
"user '{s}' not found, member of group '{s}'",
.{ member_name, groups_arr[i].name },
.{ member_name, name },
error.NotFound,
);
}