diff options
| author | Joel Klinghed <the_jk@spawned.biz> | 2025-06-23 09:07:48 +0200 |
|---|---|---|
| committer | Joel Klinghed <the_jk@spawned.biz> | 2025-06-23 09:07:48 +0200 |
| commit | aa131024ab25c6c8c5e61ddcb195def671a62a18 (patch) | |
| tree | b0b3a7a6a7c79ebfcb82c542347a7059fcba38a9 /server/src/trans.rs | |
| parent | 83c24934dc0ad18b1ed1696af3949b62146a4f22 (diff) | |
clippy: Use more rusty for loops
Diffstat (limited to 'server/src/trans.rs')
| -rw-r--r-- | server/src/trans.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/src/trans.rs b/server/src/trans.rs index 3f47c8b..64e08de 100644 --- a/server/src/trans.rs +++ b/server/src/trans.rs @@ -226,8 +226,8 @@ where let mut id_to_string = HashMap::<i64, usize>::with_capacity(translation_ids.len() - first_index); - for i in first_index..translation_ids.len() { - id_to_string.insert(translation_ids[i], i); + for (i, id) in translation_ids.iter().enumerate().skip(first_index) { + id_to_string.insert(*id, i); } while let Some(res) = translation_tasks.join_next().await { |
