diff --git a/pttodoer/src/main.rs b/pttodoer/src/main.rs index d18a9e1..44e985c 100644 --- a/pttodoer/src/main.rs +++ b/pttodoer/src/main.rs @@ -24,6 +24,10 @@ fn main() { _ => {}, }; + if flags.edit { + db.edit().expect("failed to edit"); + } + db.save(flags.dry_run).expect("failed to save"); } @@ -110,6 +114,10 @@ impl DB { result } + pub fn edit(&self) -> Result<(), String> { + Err("not impl".to_string()) + } + pub fn save(&self, dry_run: bool) -> Result<(), String> { for i in &self.0 { i.save(dry_run)?;