Expand description
Utility helpers shared across the crate — OID formatting, relative time, text, etc.
Re-exports§
pub use text::truncate_str;pub use time::fmt_oid;pub use time::relative_time;pub use time::short_oid;pub use time::short_oid_str;
Modules§
Functions§
- ascending_
range - Build an ascending
Vec<usize>spanning fromanchortotarget(inclusive), regardless of which is larger. - clamp_
next - Next index in a list, clamped at
len - 1(no wrapping). Returns 0 iflenis 0. - clamp_
selection - Clamp a selection index after a list has been resized.
- repo_
display_ name - Human-readable label for a repository path — the last path component,
or
"New Tab"whenpathisNoneor has no filename. - wrap_
next - Next index in a list, wrapping around to 0 after the last element.
Returns 0 if
lenis 0. - wrap_
prev - Previous index in a list, wrapping around to
len - 1from index 0. Returns 0 iflenis 0.