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

Function import_graph_first_node

atomic-repository/src/repository/insert.rs:1075–1087  ·  view source on GitHub ↗
(
    txn: &T,
    node: GraphNode<Option<Hash>>,
    change_id: NodeId,
)

Source from the content-addressed store, hash-verified

1073}
1074
1075fn import_graph_first_node<T: GraphTxnT>(
1076 txn: &T,
1077 node: GraphNode<Option<Hash>>,
1078 change_id: NodeId,
1079) -> Result<GraphNode<NodeId>, RepositoryError> {
1080 let pos = Position::new(node.change, node.start);
1081 let resolved = import_graph_first_position(txn, &pos, change_id)?;
1082 Ok(GraphNode {
1083 change: resolved.change,
1084 start: node.start,
1085 end: node.end,
1086 })
1087}
1088
1089fn import_graph_first_resolved_inode<T: GraphTxnT + TreeTxnT>(
1090 txn: &T,

Callers 1

Calls 1

Tested by

no test coverage detected