std.mem.ReverseIterator: make public

This commit is contained in:
Nathan Michaels 2026-03-05 13:46:50 +01:00
parent 4fa465fc8f
commit aa2f318935

View file

@ -4002,7 +4002,9 @@ test reverse {
try testing.expectEqualSlices(MyType, &arr, &([_]MyType{ .c, .{ .b = 0 }, .{ .a = .{ 0, 0, 0 } } })); try testing.expectEqualSlices(MyType, &arr, &([_]MyType{ .c, .{ .b = 0 }, .{ .a = .{ 0, 0, 0 } } }));
} }
} }
fn ReverseIterator(comptime T: type) type {
/// Returned by `reverseIterator`.
pub fn ReverseIterator(comptime T: type) type {
const ptr = switch (@typeInfo(T)) { const ptr = switch (@typeInfo(T)) {
.pointer => |ptr| ptr, .pointer => |ptr| ptr,
else => @compileError("expected slice or pointer to array, found '" ++ @typeName(T) ++ "'"), else => @compileError("expected slice or pointer to array, found '" ++ @typeName(T) ++ "'"),