remove deprecated uses of ArrayList.span
This commit is contained in:
@@ -225,15 +225,15 @@ pub fn main() !void {
|
||||
var list = std.ArrayList([]const u8).init(allocator);
|
||||
var it = global_fn_set.iterator();
|
||||
while (it.next()) |entry| try list.append(entry.key);
|
||||
std.sort.sort([]const u8, list.span(), {}, strCmpLessThan);
|
||||
break :blk list.span();
|
||||
std.sort.sort([]const u8, list.items, {}, strCmpLessThan);
|
||||
break :blk list.items;
|
||||
};
|
||||
const global_ver_list = blk: {
|
||||
var list = std.ArrayList([]const u8).init(allocator);
|
||||
var it = global_ver_set.iterator();
|
||||
while (it.next()) |entry| try list.append(entry.key);
|
||||
std.sort.sort([]const u8, list.span(), {}, versionLessThan);
|
||||
break :blk list.span();
|
||||
std.sort.sort([]const u8, list.items, {}, versionLessThan);
|
||||
break :blk list.items;
|
||||
};
|
||||
{
|
||||
const vers_txt_path = try fs.path.join(allocator, &[_][]const u8{ glibc_out_dir, "vers.txt" });
|
||||
@@ -266,13 +266,13 @@ pub fn main() !void {
|
||||
for (abi_lists) |*abi_list, abi_index| {
|
||||
const entry = target_functions.getEntry(@ptrToInt(abi_list)).?;
|
||||
const fn_vers_list = &entry.value.fn_vers_list;
|
||||
for (entry.value.list.span()) |*ver_fn| {
|
||||
for (entry.value.list.items) |*ver_fn| {
|
||||
const gop = try fn_vers_list.getOrPut(ver_fn.name);
|
||||
if (!gop.found_existing) {
|
||||
gop.entry.value = std.ArrayList(usize).init(allocator);
|
||||
}
|
||||
const ver_index = global_ver_set.getEntry(ver_fn.ver).?.value;
|
||||
if (std.mem.indexOfScalar(usize, gop.entry.value.span(), ver_index) == null) {
|
||||
if (std.mem.indexOfScalar(usize, gop.entry.value.items, ver_index) == null) {
|
||||
try gop.entry.value.append(ver_index);
|
||||
}
|
||||
}
|
||||
@@ -299,7 +299,7 @@ pub fn main() !void {
|
||||
try abilist_txt.writeByte('\n');
|
||||
continue;
|
||||
};
|
||||
for (entry.value.span()) |ver_index, it_i| {
|
||||
for (entry.value.items) |ver_index, it_i| {
|
||||
if (it_i != 0) try abilist_txt.writeByte(' ');
|
||||
try abilist_txt.print("{d}", .{ver_index});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user