Changed a type

This commit is contained in:
daladim 2021-02-21 23:45:51 +01:00
parent 5a090f5e53
commit a9f69c1160
3 changed files with 2 additions and 12 deletions

View file

@ -1,6 +1,4 @@
use uuid::Uuid;
pub type TaskId = Uuid;
pub type TaskId = String; // This is an HTML "etag"
/// A to-do task
#[derive(Clone, Debug)]
@ -11,7 +9,7 @@ pub struct Task {
}
impl Task {
pub fn id(&self) -> Uuid { self.id }
pub fn id(&self) -> &TaskId { &self.id }
pub fn name(&self) -> &str { &self.name }
pub fn completed(&self) -> bool { self.completed }