Skip to main content

walk_src_max_width

Function walk_src_max_width 

Source
pub fn walk_src_max_width(dir: impl AsRef<Path>, strip_prefix: &str) -> usize
Expand description

Walk dir recursively, find every .rs file, and return max(path_len_after_stripping(strip_prefix)) + 4.

Returns 40 if dir does not exist or contains no .rs files