MCPcopy Create free account
hub / github.com/MultiFuzz/MultiFuzz / load_json

Function load_json

hail-fuzz/src/utils.rs:155–160  ·  view source on GitHub ↗
(path: &std::path::Path)

Source from the content-addressed store, hash-verified

153}
154
155pub fn load_json<T: serde::de::DeserializeOwned>(path: &std::path::Path) -> anyhow::Result<T> {
156 serde_json::from_slice(
157 &std::fs::read(path).with_context(|| format!("failed to read: {}", path.display()))?,
158 )
159 .with_context(|| format!("failed to parse: {}", path.display()))
160}
161
162/// Retrivies the address and size of all streams in `data` with an non-zero length.
163pub(crate) fn get_non_empty_streams(data: &MultiStream) -> Vec<(StreamKey, usize)> {

Callers 2

find_input_for_testsFunction · 0.85
save_block_coverageFunction · 0.85

Calls

no outgoing calls

Tested by 1

find_input_for_testsFunction · 0.68