walker_common/
locale.rs

1use std::fmt::{Display, Formatter};
2use thousands::Separable;
3
4/// Format a number in a locale specific way
5pub struct Formatted(pub usize);
6
7impl Display for Formatted {
8    fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
9        write!(f, "{}", self.0.separate_with_commas())
10    }
11}