about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/database.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/database.rs b/src/database.rs
index 2f97d2d..98258bd 100644
--- a/src/database.rs
+++ b/src/database.rs
@@ -40,7 +40,11 @@ pub struct Task {
 
 impl ToString for Task {
     fn to_string(&self) -> String {
-        format!("{} #{}", self.task_name, self.tags)
+        if !self.tags.is_empty() {
+            format!("{} #{}", self.task_name, self.tags)
+        } else {
+            self.task_name.to_string()
+        }
     }
 }