MCPcopy Create free account
hub / github.com/RustOtomeLab/RustEng / load_cg

Function load_cg

src/config/cg.rs:52–67  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

50 let mut cg_by_id = HashMap::new();
51 for (name, entry) in item.cast {
52 cg_by_name.insert(name.clone(), (entry.index, entry.length));
53 cg_by_id.insert(entry.index, (name, entry.length));
54 }
55 CgConfig {
56 cg_by_name,
57 cg_by_id,
58 length,
59 }
60}
61
62pub(crate) fn get_cg(cg_map: &[u64]) -> Result<ModelRc<ModelRc<ExItem>>, EngineError> {
63 let mut ex_items: Vec<ModelRc<ExItem>> = Vec::with_capacity(10);
64 let mut i = 1;
65 let mut ex_page: Vec<ExItem> = Vec::new();
66 for cgs in cg_map.iter() {
67 while i <= CG_CONFIG.length() as u64 {
68 if let Some((_, length)) = CG_CONFIG.find_by_id(i) {
69 let (mut images, mut l, mut is_lock) = (Vec::new(), *length, true);
70 for j in 1..=*length {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected