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

Method append_reprs

compiler/src/modules/vm/ops.rs:254–263  ·  view source on GitHub ↗
(&self, out: &mut String, it: impl Iterator<Item = &'b Val>, seen: &mut Vec<u32>)

Source from the content-addressed store, hash-verified

252 }
253
254 fn append_reprs<'b>(&self, out: &mut String, it: impl Iterator<Item = &'b Val>, seen: &mut Vec<u32>) {
255 let mut first = true;
256 for v in it {
257 // Bound breadth: a wide structure re-referencing one big child would render without limit.
258 if out.len() > MAX_REPR_LEN { out.push_str(", ..."); break; }
259 if !first { out.push_str(", "); }
260 out.push_str(&self.repr_d(*v, seen));
261 first = false;
262 }
263 }
264
265 pub fn display(&self, v: Val) -> String { self.display_d(v, &mut Vec::new()) }
266

Callers 1

display_dMethod · 0.80

Calls 2

repr_dMethod · 0.80
lenMethod · 0.45

Tested by

no test coverage detected