summaryrefslogtreecommitdiff
path: root/tree-viz/src/config.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tree-viz/src/config.rs')
-rw-r--r--tree-viz/src/config.rs24
1 files changed, 24 insertions, 0 deletions
diff --git a/tree-viz/src/config.rs b/tree-viz/src/config.rs
new file mode 100644
index 0000000..6f34291
--- /dev/null
+++ b/tree-viz/src/config.rs
@@ -0,0 +1,24 @@
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}
9
10impl Default for Config {
11 fn default() -> Self {
12 Config::new()
13 }
14}
15
16impl Config {
17 fn new() -> Self {
18 Self {
19 indent_level: 2,
20 show_ranges: true,
21 show_src: true,
22 }
23 }
24}