git_igitt/settings.rs
1#[derive(Clone)]
2pub struct AppSettings {
3 pub tab_spaces: String,
4}
5
6impl Default for AppSettings {
7 fn default() -> Self {
8 Self {
9 tab_spaces: " ".to_string(),
10 }
11 }
12}
13
14impl AppSettings {
15 pub fn tab_width(mut self, width: usize) -> Self {
16 self.tab_spaces = " ".repeat(width);
17 self
18 }
19}