Syncs without handling conflicts
This commit is contained in:
parent
4dd0bea78b
commit
6fe9b71e16
4 changed files with 131 additions and 7 deletions
10
src/task.rs
10
src/task.rs
|
@ -1,10 +1,12 @@
|
|||
use std::fmt::{Display, Formatter};
|
||||
|
||||
use chrono::{Utc, DateTime};
|
||||
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
// TODO: turn into this one day
|
||||
// pub type TaskId = String; // This is an HTML "etag"
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
#[derive(Clone, Debug, PartialEq, Hash, Serialize, Deserialize)]
|
||||
pub struct TaskId {
|
||||
content: String,
|
||||
}
|
||||
|
@ -14,6 +16,12 @@ impl TaskId{
|
|||
Self { content:u }
|
||||
}
|
||||
}
|
||||
impl Eq for TaskId {}
|
||||
impl Display for TaskId {
|
||||
fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), std::fmt::Error> {
|
||||
write!(f, "{}", self.content)
|
||||
}
|
||||
}
|
||||
|
||||
/// A to-do task
|
||||
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue