From a6fd0110b65ec352603d69b9c4ccf3532689cd32 Mon Sep 17 00:00:00 2001 From: Joris Date: Sun, 18 Dec 2022 15:03:51 +0100 Subject: Upgrade dependencies --- src/db/events.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/db') diff --git a/src/db/events.rs b/src/db/events.rs index 86206bb..1721967 100644 --- a/src/db/events.rs +++ b/src/db/events.rs @@ -11,11 +11,11 @@ pub fn insert(conn: &Connection, event: &Event) -> Result<()> { None => None, }; - let category = event.category.map(|id| id.to_hyphenated().to_string()); + let category = event.category.map(|id| id.hyphenated().to_string()); conn.execute( "INSERT INTO events (id, date, start, end, name, repetition, category, created, updated) VALUES (?, ?, ?, ?, ?, ?, ?, datetime(), datetime())", - params![event.id.to_hyphenated().to_string(), event.date, event.start, event.end, event.name, repetition, category] + params![event.id.hyphenated().to_string(), event.date, event.start, event.end, event.name, repetition, category] )?; Ok(()) @@ -27,11 +27,11 @@ pub fn update(conn: &Connection, event: &Event) -> Result<()> { None => None, }; - let category = event.category.map(|id| id.to_hyphenated().to_string()); + let category = event.category.map(|id| id.hyphenated().to_string()); conn.execute( "UPDATE events SET date = ?, start = ?, end = ?, name = ?, repetition = ?, category = ?, updated = datetime() WHERE id = ?", - params![event.date, event.start, event.end, event.name, repetition, category, event.id.to_hyphenated().to_string()] + params![event.date, event.start, event.end, event.name, repetition, category, event.id.hyphenated().to_string()] )?; Ok(()) @@ -40,7 +40,7 @@ pub fn update(conn: &Connection, event: &Event) -> Result<()> { pub fn delete(conn: &Connection, id: &Uuid) -> Result<()> { conn.execute( "DELETE FROM events WHERE id = ?", - params![id.to_hyphenated().to_string()], + params![id.hyphenated().to_string()], )?; Ok(()) -- cgit v1.2.3