File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -10,9 +10,12 @@ fn Borrow(comptime T: type) type {
1010
1111pub fn Pool (comptime T : type ) type {
1212 return struct {
13- const Iterator = struct {
13+ pub const Iterator = struct {
1414 items : []T ,
15- inner : std .DynamicBitSetUnmanaged .Iterator (.{}),
15+ inner : std .DynamicBitSetUnmanaged .Iterator (.{
16+ .kind = .set ,
17+ .direction = .forward ,
18+ }),
1619
1720 pub fn next (self : * Iterator ) ? T {
1821 const index = self .inner .next () orelse return null ;
@@ -70,7 +73,7 @@ pub fn Pool(comptime T: type) type {
7073 return self .items [index ];
7174 }
7275
73- fn get_ptr (self : * Self , index : usize ) * T {
76+ fn get_ptr (self : * const Self , index : usize ) * T {
7477 return & self .items [index ];
7578 }
7679
@@ -132,7 +135,7 @@ pub fn Pool(comptime T: type) type {
132135 }
133136
134137 /// Returns an iterator over the taken values in the Pool.
135- pub fn iterator (self : * Self ) Iterator {
138+ pub fn iterator (self : * const Self ) Iterator {
136139 const iter = self .dirty .iterator (.{});
137140 const items = self .items ;
138141 return .{ .inner = iter , .items = items };
You can’t perform that action at this time.
0 commit comments