aboutsummaryrefslogtreecommitdiff
path: root/src/config.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/config.rs')
-rw-r--r--src/config.rs26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/config.rs b/src/config.rs
new file mode 100644
index 0000000..18ed5cc
--- /dev/null
+++ b/src/config.rs
@@ -0,0 +1,26 @@
1use std::default::Default;
2
3#[derive(Clone, Copy)]
4pub struct Config {
5 pub indent_level: usize,
6 pub show_ranges: bool,
7 pub show_src: bool,
8 pub show_field_name: bool,
9}
10
11impl Default for Config {
12 fn default() -> Self {
13 Config::new()
14 }
15}
16
17impl Config {
18 fn new() -> Self {
19 Self {
20 indent_level: 2,
21 show_ranges: true,
22 show_src: true,
23 show_field_name: true,
24 }
25 }
26}