MCPcopy Create free account
hub / github.com/LPC4/Full-Stack / all_example_file_manifests_build

Function all_example_file_manifests_build

src/build.rs:552–570  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

550 let first_override = OVERRIDES
551 .iter()
552 .find(|key| values.get(key).is_some())
553 .copied();
554 match (preset, first_override) {
555 (None | Some("off"), None) => return Ok(None),
556 (None, Some(key)) => {
557 return Err(format!("`{key}` requires `latency = \"realistic\"`"));
558 }
559 (Some("off"), Some(key)) => {
560 return Err(format!("`{key}` conflicts with `latency = \"off\"`"));
561 }
562 (Some("realistic"), _) => {}
563 (Some(other), _) => return Err(format!("unknown latency preset `{other}`")),
564 }
565
566 let mut config = MemoryLatencyConfig::realistic();
567 for key in OVERRIDES {
568 let Some(raw) = values.get(key) else {
569 continue;
570 };
571 let cycles = raw
572 .parse::<u32>()
573 .map_err(|err| format!("`{key}` must be a positive integer: {err}"))?;

Callers

nothing calls this directly

Calls 1

collect_build_filesFunction · 0.70

Tested by

no test coverage detected