1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
pub enum CliFlag {
ClearBranch,
ClearRepo,
ShortView,
View,
}
pub enum ConfigFile {
Branch,
Repo,
}
impl CliFlag {
pub fn value(&self) -> &str {
match *self {
CliFlag::ClearBranch => "clear-branch",
CliFlag::ClearRepo => "clear-repo",
CliFlag::ShortView => "v",
CliFlag::View => "view",
}
}
}
impl ConfigFile {
pub fn value(&self) -> &str {
match *self {
ConfigFile::Branch => "branch",
ConfigFile::Repo => "repo_path",
}
}
}