(
&self,
pos: Position<NodeId>,
)
| 539 | } |
| 540 | |
| 541 | fn find_block_end( |
| 542 | &self, |
| 543 | pos: Position<NodeId>, |
| 544 | ) -> Result<GraphNode<NodeId>, PristineError> { |
| 545 | if self.empty || pos == Position::ROOT { |
| 546 | Err(PristineError::BlockNotFound { |
| 547 | change: pos.change.get(), |
| 548 | pos: pos.pos.get(), |
| 549 | }) |
| 550 | } else { |
| 551 | // Return a span ending at the position |
| 552 | Ok(GraphNode::new( |
| 553 | pos.change, |
| 554 | ChangePosition::new(pos.pos.get().saturating_sub(10)), |
| 555 | pos.pos, |
| 556 | )) |
| 557 | } |
| 558 | } |
| 559 | |
| 560 | fn has_vertex(&self, _vertex: GraphNode<NodeId>) -> Result<bool, PristineError> { |
| 561 | Ok(!self.empty) |
no test coverage detected