MCPcopy Create free account
hub / github.com/dylan-sutton-chavez/edge-python / fetch_bytes

Method fetch_bytes

compiler/tests/common.rs:121–131  ·  view source on GitHub ↗
(
        &mut self,
        spec: &str,
        _expected_hash: Option<[u8; 32]>,
    )

Source from the content-addressed store, hash-verified

119 }
120
121 fn fetch_bytes(
122 &mut self,
123 spec: &str,
124 _expected_hash: Option<[u8; 32]>,
125 ) -> Result<Vec<u8>, String> {
126 // In-memory map; the parser still runs its hash check downstream.
127 match self.state.borrow().bytes.get(spec) {
128 Some(b) => Ok(b.clone()),
129 None => Err(format!("module '{}' integrity verification not supported by this resolver", spec)),
130 }
131 }
132}
133
134impl TestResolver {

Callers

nothing calls this directly

Calls 2

borrowMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected