@@ -100,14 +100,6 @@ pub fn SegmentList(Segment: type) type {
100
100
}
101
101
}
102
102
103
- pub fn getInfos (self : Self , allocator : Allocator ) Allocator.Error ! []SegmentInfo {
104
- var infos = try allocator .alloc (SegmentInfo , self .nodes .items .len );
105
- for (self .nodes .items , 0.. ) | node , i | {
106
- infos [i ] = node .value .info ;
107
- }
108
- return infos ;
109
- }
110
-
111
103
pub fn search (self : Self , hashes : []const u32 , results : * SearchResults , deadline : Deadline ) ! void {
112
104
for (self .nodes .items ) | node | {
113
105
if (deadline .isExpired ()) {
@@ -118,14 +110,6 @@ pub fn SegmentList(Segment: type) type {
118
110
results .removeOutdatedResults (self );
119
111
}
120
112
121
- pub fn getMaxCommitId (self : Self ) u64 {
122
- var max_commit_id : u64 = 0 ;
123
- for (self .nodes .items ) | node | {
124
- max_commit_id = @max (max_commit_id , node .value .max_commit_id );
125
- }
126
- return max_commit_id ;
127
- }
128
-
129
113
fn compareByVersion (_ : void , lhs : u32 , rhs : Node ) bool {
130
114
return lhs < rhs .value .id .version ;
131
115
}
@@ -146,10 +130,6 @@ pub fn SegmentList(Segment: type) type {
146
130
return false ;
147
131
}
148
132
149
- pub fn count (self : Self ) usize {
150
- return self .nodes .items .len ;
151
- }
152
-
153
133
pub fn getFirst (self : Self ) ? Node {
154
134
return if (self .nodes .items .len > 0 ) self .nodes .items [0 ] else null ;
155
135
}
0 commit comments