Clippy code cleanup

This commit is contained in:
micialware committed 2026-08-15 13:22:59 +03:00
1 parent 9917702c4c
commit e676898135
22 files changed
+290 -171

No files matched your search

+3 -5
View File
@@ -50,16 +50,14 @@ pub fn add_words(words: &mut[WordData], connection: &mut Connection) {
let start_index = last_index - (count as u32) + 1;
let mut index = 0;
for id in start_index..=last_index {
for (index, id) in (start_index..=last_index).enumerate() {
words[index].id = id;
index += 1;
}
}
pub fn update_word(word: &mut WordData, connection: &Connection) {
if word.id == 0 {
add_word(word, &connection);
add_word(word, connection);
} else {
connection
.execute(
@@ -155,7 +153,7 @@ pub fn add_group(group: &mut WordGroup, connection: &Connection) {
pub fn update_group(group: &mut WordGroup, connection: &Connection) {
if group.id == 0 {
add_group(group, &connection);
add_group(group, connection);
} else {
connection
.execute(