From 5ff42c0a2d7944fd4bbfb424dd0fa05ced266469 Mon Sep 17 00:00:00 2001 From: Joan Lledó Date: Sat, 16 Sep 2023 11:34:25 +0200 Subject: Implement ToString trait for Task --- src/database.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/database.rs b/src/database.rs index 6c558fe..f422d23 100644 --- a/src/database.rs +++ b/src/database.rs @@ -38,6 +38,12 @@ pub struct Task { pub tags: String, } +impl ToString for Task { + fn to_string(&self) -> String { + format!("{} #{}", self.task_name, self.tags) + } +} + #[derive( Debug, Clone, -- cgit 1.4.1