refactor(config): use new managed array list
This commit is contained in:
@@ -29,8 +29,8 @@ pub const ModuleType = enum {
|
|||||||
custom,
|
custom,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub fn getModulesTypes(allocator: std.mem.Allocator, config: ?std.json.Parsed(Config)) !std.ArrayList(ModuleType) {
|
pub fn getModulesTypes(allocator: std.mem.Allocator, config: ?std.json.Parsed(Config)) !std.array_list.Managed(ModuleType) {
|
||||||
var modules_list = std.ArrayList(ModuleType).init(allocator);
|
var modules_list = std.array_list.Managed(ModuleType).init(allocator);
|
||||||
|
|
||||||
if (config) |c| {
|
if (config) |c| {
|
||||||
for (c.value.modules) |module| {
|
for (c.value.modules) |module| {
|
||||||
|
|||||||
Reference in New Issue
Block a user