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

Function lookup_hash

atomic-core/src/output/repo/content.rs:109–120  ·  view source on GitHub ↗
(hash_fn: &F, node_id: NodeId)

Source from the content-addressed store, hash-verified

107}
108
109fn lookup_hash<F>(hash_fn: &F, node_id: NodeId) -> OutputResult<Option<Hash>>
110where
111 F: Fn(NodeId) -> Result<Option<Hash>, PristineError>,
112{
113 if node_id.is_root() {
114 return Ok(None);
115 }
116
117 hash_fn(node_id)?
118 .map(Some)
119 .ok_or_else(|| PristineError::ChangeNotFound { id: node_id.get() }.into())
120}
121
122fn output_vertex_content<C, F, V>(
123 changes: &C,

Callers 3

output_vertex_contentFunction · 0.85
output_graph_contentFunction · 0.85

Calls 2

getMethod · 0.65
is_rootMethod · 0.45

Tested by

no test coverage detected