diff options
author | Ricky Kresslein <ricky@unobserved.io> | 2023-10-15 10:44:42 +0200 |
---|---|---|
committer | Ricky Kresslein <ricky@unobserved.io> | 2023-10-15 10:44:42 +0200 |
commit | 5a21b2528e30706cba939fd38102cafa5100c783 (patch) | |
tree | abd70d0c88111e1d381897d409d5ce7c155903f0 /src | |
parent | 191b903380a8d9aeace8686c543b3fef5d16272d (diff) | |
download | Furtherance-5a21b2528e30706cba939fd38102cafa5100c783.tar.zst |
No longer show '#' for an empty tag in autocomplete
Diffstat (limited to 'src')
-rw-r--r-- | src/database.rs | 6 |
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() + } } } |