diff options
| author | Fri3dNstuff <102751849+Fri3dNstuff@users.noreply.github.com> | 2024-08-05 01:02:15 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-08-04 22:02:15 +0000 |
| commit | a655c15c4004d553ea462652f69acd37e4514f79 (patch) | |
| tree | 2583cde80585d836509b2edfe11e98a22385327a /lib/std/debug/SelfInfo.zig | |
| parent | ea847535fc393f7f73801285af8960379e9376c8 (diff) | |
| download | zig-a655c15c4004d553ea462652f69acd37e4514f79.tar.gz zig-a655c15c4004d553ea462652f69acd37e4514f79.zip | |
std.sort: Remove key argument from binary-search-like functions (#20927)
closes #20110
Diffstat (limited to 'lib/std/debug/SelfInfo.zig')
| -rw-r--r-- | lib/std/debug/SelfInfo.zig | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/std/debug/SelfInfo.zig b/lib/std/debug/SelfInfo.zig index c27f466fb3..f9747a088e 100644 --- a/lib/std/debug/SelfInfo.zig +++ b/lib/std/debug/SelfInfo.zig @@ -1842,14 +1842,14 @@ pub fn unwindFrameDwarf( &fde, ); } else { - const index = std.sort.binarySearch(Dwarf.FrameDescriptionEntry, context.pc, di.fde_list.items, {}, struct { - pub fn compareFn(_: void, pc: usize, mid_item: Dwarf.FrameDescriptionEntry) std.math.Order { - if (pc < mid_item.pc_begin) return .lt; + const index = std.sort.binarySearch(Dwarf.FrameDescriptionEntry, di.fde_list.items, context.pc, struct { + pub fn compareFn(pc: usize, item: Dwarf.FrameDescriptionEntry) std.math.Order { + if (pc < item.pc_begin) return .gt; - const range_end = mid_item.pc_begin + mid_item.pc_range; + const range_end = item.pc_begin + item.pc_range; if (pc < range_end) return .eq; - return .gt; + return .lt; } }.compareFn); |
