Formating with fmt
This commit is contained in:
1 parent
de2dbaf6c1
commit
bf805b79e5
13 files changed
+44
-42
No files matched your search
@@ -1,5 +1,5 @@
|
||||
use crate::lang::{WordData, WordGroup};
|
||||
use rusqlite::{params, Connection};
|
||||
use rusqlite::{Connection, params};
|
||||
use std::collections::HashMap;
|
||||
|
||||
pub fn add_word(word: &mut WordData, connection: &Connection) {
|
||||
@@ -45,7 +45,6 @@ pub fn add_words(words: &mut [WordData], connection: &mut Connection) {
|
||||
let last_index: u32 = tx.last_insert_rowid() as u32;
|
||||
tx.commit().unwrap();
|
||||
|
||||
|
||||
let start_index = last_index - (count as u32) + 1;
|
||||
|
||||
for (index, id) in (start_index..=last_index).enumerate() {
|
||||
@@ -129,7 +128,7 @@ pub fn load_word_groups(connection: &Connection) -> Vec<WordGroup> {
|
||||
}
|
||||
|
||||
pub fn add_group(group: &mut WordGroup, connection: &Connection) {
|
||||
let index : u32 = connection
|
||||
let index: u32 = connection
|
||||
.query_row(
|
||||
"INSERT INTO word_group (name) VALUES (?1) RETURNING id",
|
||||
(&group.name,),
|
||||
|
||||
Reference in new issue
Block a user