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())