From 76e76470e0f1d313374d6a1f3144636a8331d891 Mon Sep 17 00:00:00 2001 From: Alexander Krotov Date: Sun, 28 Jul 2019 21:36:17 +0300 Subject: [PATCH] Replace range loop with foreach loop --- src/dc_location.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/dc_location.rs b/src/dc_location.rs index 5977a939b..b16e3cb74 100644 --- a/src/dc_location.rs +++ b/src/dc_location.rs @@ -441,9 +441,7 @@ pub unsafe fn dc_save_locations( let mut newest_timestamp = 0; let mut newest_location_id = 0; - for i in 0..locations.len() { - let location = &locations[i]; - + for location in locations { let exists = stmt_test.exists(params![location.timestamp, contact_id as i32])?;