##// END OF EJS Templates
rust: implement vcsgraph::RankedGraph for Index...
pacien -
r49708:4346be45 default
parent child Browse files
Show More
@@ -177,6 +177,20 b' impl vcsgraph::graph::Graph for Index {'
177 }
177 }
178 }
178 }
179
179
180 impl vcsgraph::graph::RankedGraph for Index {
181 fn rank(
182 &self,
183 rev: Revision,
184 ) -> Result<vcsgraph::graph::Rank, vcsgraph::graph::GraphReadError> {
185 match unsafe {
186 (self.capi.fast_rank)(self.index.as_ptr(), rev as ssize_t)
187 } {
188 -1 => Err(vcsgraph::graph::GraphReadError::InconsistentGraphData),
189 rank => Ok(rank as usize),
190 }
191 }
192 }
193
180 impl RevlogIndex for Index {
194 impl RevlogIndex for Index {
181 /// Note C return type is Py_ssize_t (hence signed), but we shall
195 /// Note C return type is Py_ssize_t (hence signed), but we shall
182 /// force it to unsigned, because it's a length
196 /// force it to unsigned, because it's a length
General Comments 0
You need to be logged in to leave comments. Login now