MCPcopy Create free account
hub / github.com/Noumena-Network/code / stderr_tail_formatted_bytes

Function stderr_tail_formatted_bytes

rust/py_repl_host/src/main.rs:442–449  ·  view source on GitHub ↗
(lines: &VecDeque<String>)

Source from the content-addressed store, hash-verified

440}
441
442fn stderr_tail_formatted_bytes(lines: &VecDeque<String>) -> usize {
443 if lines.is_empty() {
444 return 0;
445 }
446 let payload_bytes: usize = lines.iter().map(String::len).sum();
447 let separator_bytes = STDERR_TAIL_SEPARATOR.len() * (lines.len() - 1);
448 payload_bytes + separator_bytes
449}
450
451fn stderr_tail_bytes_with_candidate(lines: &VecDeque<String>, line: &str) -> usize {
452 if lines.is_empty() {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected