diff options
author | Akshay <[email protected]> | 2020-07-15 16:47:14 +0100 |
---|---|---|
committer | Akshay <[email protected]> | 2020-07-15 16:47:14 +0100 |
commit | ef3f556099a3f13ae0c9d0719994805e4682cce7 (patch) | |
tree | a93a91107d2744cce109b2c041281d5dcf6d045f /src/app.rs | |
parent | 859ac5d3e49bc9a123df3f5a74b43d2281a3bed1 (diff) |
make `add` command easier to use
Diffstat (limited to 'src/app.rs')
-rw-r--r-- | src/app.rs | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -208,7 +208,8 @@ impl App { | |||
208 | pub fn parse_command(&mut self, input: &str) { | 208 | pub fn parse_command(&mut self, input: &str) { |
209 | let c = Command::from_string(input); | 209 | let c = Command::from_string(input); |
210 | match c { | 210 | match c { |
211 | Command::Add(name, kind, goal, auto) => { | 211 | Command::Add(name, goal, auto) => { |
212 | let kind = if goal == Some(1) { "bit" } else { "count" }; | ||
212 | if kind == "count" { | 213 | if kind == "count" { |
213 | self.add_habit(Box::new(Count::new( | 214 | self.add_habit(Box::new(Count::new( |
214 | name, | 215 | name, |