mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-03-07 23:04:34 +01:00
std.mem.ReverseIterator: make public
This commit is contained in:
parent
4fa465fc8f
commit
aa2f318935
1 changed files with 3 additions and 1 deletions
|
|
@ -4002,7 +4002,9 @@ test reverse {
|
|||
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)) {
|
||||
.pointer => |ptr| ptr,
|
||||
else => @compileError("expected slice or pointer to array, found '" ++ @typeName(T) ++ "'"),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue