MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / find_block_end

Method find_block_end

atomic-core/src/record/workflow/retrieve.rs:541–558  ·  view source on GitHub ↗
(
            &self,
            pos: Position<NodeId>,
        )

Source from the content-addressed store, hash-verified

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)

Callers 1

build_directory_deleteFunction · 0.45

Calls 1

getMethod · 0.65

Tested by

no test coverage detected