Fixing some code problems
This commit is contained in:
1 parent
a4d77196d0
commit
98c8093961
9 files changed
+32
-109
No files matched your search
@@ -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;
|
||||
|
||||
|
||||
Reference in new issue
Block a user