From b9c988f42504c2e4cfa0715ac8f2d2a0db591cad Mon Sep 17 00:00:00 2001 From: Mx Kookie Date: Tue, 15 Dec 2020 19:41:48 +0000 Subject: cassiopeia: finishing up version 0.3.0 This commit does kind of a lot to get cass(1) over the finish line. For one it implements all the CLI functions (well, almost all) with their respective parameters, and also creates a new `gen` module which uses the IR stream to generate a new file based on the old one, while updating header fields that need to be updated (currently only `version`). This version does nothing with the actual header values, and probably has a lot of bugs. More documentation will follow in future cassiopeia commits. --- apps/cassiopeia/src/data.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'apps/cassiopeia/src/data.rs') diff --git a/apps/cassiopeia/src/data.rs b/apps/cassiopeia/src/data.rs index 47bb6e35b6e5..188c0255203d 100644 --- a/apps/cassiopeia/src/data.rs +++ b/apps/cassiopeia/src/data.rs @@ -5,7 +5,7 @@ //! analysis tasks. use crate::{ - format::{IrItem, IrType, MakeIr}, + format::ir::{IrItem, IrType, MakeIr}, Date, Time, }; use chrono::{DateTime, Duration, FixedOffset as Offset, Local, NaiveDate}; @@ -96,7 +96,7 @@ impl TimeFile { } /// Add a new invoice block to the time file - pub(crate) fn invoice(&mut self) -> Option<()> { + pub(crate) fn invoice(&mut self) -> Option { let today = Date::today(); let last_sess = self.get_last_session().cloned(); @@ -119,8 +119,7 @@ impl TimeFile { _ => {} } - self.invoices.push(Invoice::new(today)); - Some(()) + Some(Invoice::new(today)) } } -- cgit v1.2.3