MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / col_width

Function col_width

atomic-cli/src/commands/memory/list.rs:520–526  ·  view source on GitHub ↗

The width of a column: the widest row cell, but at least the header width.

(cell_lens: impl Iterator<Item = usize>, header: &str)

Source from the content-addressed store, hash-verified

518
519/// The width of a column: the widest row cell, but at least the header width.
520fn col_width(cell_lens: impl Iterator<Item = usize>, header: &str) -> usize {
521 let header_w = header.chars().count();
522 cell_lens
523 .chain(std::iter::once(header_w))
524 .max()
525 .unwrap_or(header_w)
526}
527
528/// Is this `memory/…` entry the vault's index scaffold rather than a real
529/// canonical memory? The default `memory/MEMORY.md` installed by `init_vault`

Callers 2

renderMethod · 0.85
runMethod · 0.85

Calls 1

countMethod · 0.45

Tested by

no test coverage detected