Fixing some code problems

This commit is contained in:
micialware committed 2026-08-19 17:33:22 +03:00
1 parent a4d77196d0
commit 98c8093961
9 files changed
+32 -109

No files matched your search

+1 -7
View File
@@ -46,15 +46,9 @@ pub fn add_words(words: &mut [WordData], connection: &mut Connection) {
}
}
let last_index: u32 = tx.last_insert_rowid() as u32;
tx.commit().unwrap();
let last_index: u32 = connection
.query_one(
"SELECT seq from sqlite_sequence WHERE name == ?1",
("words".to_string(),),
|row| row.get(0),
)
.unwrap();
let start_index = last_index - (count as u32) + 1;