From a668b1411649239931ed27518787b12886006e29 Mon Sep 17 00:00:00 2001 From: Cameron Date: Sun, 24 Nov 2024 12:56:21 -0500 Subject: [PATCH] Update deprecated functions --- src/files.rs | 4 ++-- src/tags.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/files.rs b/src/files.rs index 9b8f7a8..cd6ed72 100644 --- a/src/files.rs +++ b/src/files.rs @@ -73,8 +73,8 @@ pub async fn list_photos( .filter(|file_path| file_path.starts_with(search_path)) .collect() }) - .map(|tagged_files| { - trace!("Found tagged files: {:?}", tagged_files); + .map(|tagged_files: Vec| { + trace!("Found {:?} tagged files: {:?}", tagged_files.len(), tagged_files); HttpResponse::Ok().json(PhotosResponse { photos: tagged_files, diff --git a/src/tags.rs b/src/tags.rs index a8fd969..2474670 100644 --- a/src/tags.rs +++ b/src/tags.rs @@ -276,7 +276,7 @@ impl TagDao for SqliteTagDao { .with_context(|| format!("Unable to insert tag {:?} in Sqlite", name)) .and_then(|_| { info!("Inserted tag: {:?}", name); - sql_function! { + define_sql_function! { fn last_insert_rowid() -> diesel::sql_types::Integer; } diesel::select(last_insert_rowid()) @@ -329,7 +329,7 @@ impl TagDao for SqliteTagDao { .with_context(|| format!("Unable to tag file {:?} in sqlite", path)) .and_then(|_| { info!("Inserted tagged photo: {:#} -> {:?}", tag_id, path); - sql_function! { + define_sql_function! { fn last_insert_rowid() -> diesel::sql_types::Integer; } diesel::select(last_insert_rowid())