@@ -498,7 +498,9 @@ pub fn SortedMap(
498498 const parent_node = self .path .node_stack [h ];
499499 const parent_idx = self .path .idx_stack [h ];
500500 const parent_inner = self .sorted_tree .asPtr (InnerNode , parent_node );
501- if (parent_idx > 0 and ! keysEql (parent_inner .keys [parent_idx - 1 ], EMPTY_KEY )) {
501+ if (parent_idx > 0 and
502+ ! keysEql (parent_inner .keys [parent_idx - 1 ], EMPTY_KEY ))
503+ {
502504 node_offset = parent_inner .values [parent_idx - 1 ];
503505 self .path .idx_stack [h ] = parent_idx - 1 ;
504506 // Descend to rightmost leaf
@@ -836,7 +838,9 @@ pub fn SortedMap(
836838
837839 const new_node_offset : Offset = @intCast (self .data .items .len + padding_len );
838840 self .data .items .len += @sizeOf (Node );
839- const node : * Node = @alignCast (@ptrCast (self .data .items [padding_len .. ][new_node_offset .. ][0.. @sizeOf (Node )]));
841+ const node : * Node = @alignCast (@ptrCast (
842+ self .data .items [padding_len .. ][new_node_offset .. ][0.. @sizeOf (Node )],
843+ ));
840844 node .* = .{ .keys = @splat (EMPTY_KEY ), .values = @splat (undefined ) };
841845 return new_node_offset ;
842846 }
@@ -1435,7 +1439,6 @@ pub fn deinitMapAndValues(allocator: Allocator, const_map: anytype) void {
14351439
14361440const expect = std .testing .expect ;
14371441const expectEqual = std .testing .expectEqual ;
1438- const expectEqualSlices = std .testing .expectEqualSlices ;
14391442
14401443test SortedSet {
14411444 const allocator = std .testing .allocator ;
@@ -1592,26 +1595,6 @@ test "order slices" {
15921595 try expectEqual (orderSlices (u8 , std .math .order , & e , & b ), .lt );
15931596}
15941597
1595- // test "SortedMap slice range" {
1596- // const allocator = std.testing.allocator;
1597-
1598- // var set: SortedSet([]const u8, .{ .empty_key = "empty" }) = .empty;
1599- // defer set.deinit(allocator);
1600-
1601- // try set.put(allocator, &.{ 0, 0, 10 }, {});
1602- // try set.put(allocator, &.{ 0, 0, 20 }, {});
1603- // try set.put(allocator, &.{ 0, 0, 30 }, {});
1604- // try set.put(allocator, &.{ 0, 0, 40 }, {});
1605-
1606- // const range = set.rangeCustom(null, .{ .inclusive = &.{ 0, 0, 40 } });
1607-
1608- // try std.testing.expectEqual(4, range.len);
1609- // try std.testing.expectEqualSlices(u8, &.{ 0, 0, 10 }, range[0]);
1610- // try std.testing.expectEqualSlices(u8, &.{ 0, 0, 20 }, range[1]);
1611- // try std.testing.expectEqualSlices(u8, &.{ 0, 0, 30 }, range[2]);
1612- // try std.testing.expectEqualSlices(u8, &.{ 0, 0, 40 }, range[3]);
1613- // }
1614-
16151598test "binarySearch slice of slices" {
16161599 const slices = [4 ][]const u8 {
16171600 &.{ 0 , 0 , 10 },
0 commit comments