Fixing partial adding bug

This commit is contained in:
2026-08-16 14:23:00 +03:00
parent 51c8d7be74
commit 11b38479c1
4 changed files with 41 additions and 63 deletions
+3
View File
@@ -27,6 +27,7 @@ pub fn load_stats_of_set(set: &CardSetSettings, connection: &Connection) -> Vec<
}
pub fn add_stat_list(stat: &mut [CardStatistics], connection: &Connection) {
let time = Instant::now();
let inserting = stat
.iter()
.map(|stat| {
@@ -63,6 +64,8 @@ pub fn add_stat_list(stat: &mut [CardStatistics], connection: &Connection) {
for (index, id) in (start_index..=last_index).enumerate() {
stat[index].id = id;
}
println!("Added {} cards for {:?}", stat.len(), time.elapsed());
}
// pub fn add_stat(stat: &mut CardStatistics, connection: &Connection) {