diff options
| author | jakka <jakka@jakka.su> | 2025-09-27 17:40:39 +0300 |
|---|---|---|
| committer | jakka <jakka@jakka.su> | 2025-09-27 17:40:39 +0300 |
| commit | 1aa81a1c3d5e56a0a6024beed0ba47ecea1a3492 (patch) | |
| tree | 2384bb4714c2d234de4d576452ef4708e15149be /src/db.rs | |
| parent | 20d6438440de1f63eeb9d80eced475e001be02f0 (diff) | |
| parent | 9e4796570baf97d2193745a350e9611fa21d6a78 (diff) | |
merged main
Diffstat (limited to 'src/db.rs')
| -rw-r--r-- | src/db.rs | 9 |
1 files changed, 1 insertions, 8 deletions
@@ -88,9 +88,6 @@ async fn init_clean_files(conn: &Connection) -> Result<Vec<PathBuf>, turso::Erro while let Ok(Some(row)) = rows.next().await { let path = row.get::<String>(0)?; files.push(PathBuf::from(path)); - } - Ok(files) -} async fn remove_file(conn: &Connection, filename: &Path) -> Result<()> { conn.execute(REMOVE_FILE, params!(filename.to_str().unwrap())) @@ -104,9 +101,6 @@ async fn get_toencode_files(conn: &Connection) -> Result<Vec<PathBuf>, turso::Er while let Ok(Some(row)) = rows.next().await { let path = row.get::<String>(0)?; files.push(PathBuf::from(path)); - } - Ok(files) -} async fn get_toencode_number(conn: &Connection) -> Result<u64, turso::Error> { Ok(conn @@ -133,6 +127,7 @@ async fn vacuum(conn: &Connection) -> Result<()> { Ok(()) } + #[cfg(test)] mod tests { @@ -157,7 +152,6 @@ mod tests { insert_file(&conn, &path).await.unwrap(); } let mut returned = conn.query(TOENCODE_PATHS, ()).await.unwrap(); - while let Ok(Some(_)) = returned.next().await { counter += 1 } @@ -183,7 +177,6 @@ mod tests { .await .unwrap(); } - conn.execute( UPDATE_FILE, params