@@ -234,41 +234,41 @@ fn table_cursor_test<T: TableType>(
234234
235235 // Test lower_bound().
236236 let mut cursor = table. cursor ( & txn) . unwrap ( ) ;
237- let current = cursor. lower_bound ( & ( 0 , 0 ) ) . unwrap ( ) ;
238- assert_eq ! ( current , Some ( ( ( 1 , 1 ) , 7 ) ) ) ;
239- let current = cursor. lower_bound ( & ( 2 , 2 ) ) . unwrap ( ) ;
240- assert_eq ! ( current , Some ( ( ( 2 , 2 ) , 2 ) ) ) ;
241- let current = cursor. lower_bound ( & ( 2 , 4 ) ) . unwrap ( ) ;
242- assert_eq ! ( current , Some ( ( ( 3 , 1 ) , 8 ) ) ) ;
243- let current = cursor. lower_bound ( & ( 4 , 4 ) ) . unwrap ( ) ;
244- assert_eq ! ( current , None ) ;
237+ let current_entry = cursor. lower_bound ( & ( 0 , 0 ) ) . unwrap ( ) ;
238+ assert_eq ! ( current_entry , Some ( ( ( 1 , 1 ) , 7 ) ) ) ;
239+ let current_entry = cursor. lower_bound ( & ( 2 , 2 ) ) . unwrap ( ) ;
240+ assert_eq ! ( current_entry , Some ( ( ( 2 , 2 ) , 2 ) ) ) ;
241+ let current_entry = cursor. lower_bound ( & ( 2 , 4 ) ) . unwrap ( ) ;
242+ assert_eq ! ( current_entry , Some ( ( ( 3 , 1 ) , 8 ) ) ) ;
243+ let current_entry = cursor. lower_bound ( & ( 4 , 4 ) ) . unwrap ( ) ;
244+ assert_eq ! ( current_entry , None ) ;
245245
246246 // Iterate using next().
247247 let mut cursor = table. cursor ( & txn) . unwrap ( ) ;
248- let mut current = cursor. lower_bound ( & ( 0 , 0 ) ) . unwrap ( ) ;
248+ let mut current_entry = cursor. lower_bound ( & ( 0 , 0 ) ) . unwrap ( ) ;
249249 for kv_pair in SORTED_VALUES {
250- assert_eq ! ( current , Some ( kv_pair) ) ;
251- current = cursor. next ( ) . unwrap ( ) ;
250+ assert_eq ! ( current_entry , Some ( kv_pair) ) ;
251+ current_entry = cursor. next ( ) . unwrap ( ) ;
252252 }
253- current = cursor. next ( ) . unwrap ( ) ;
254- assert_eq ! ( current , None ) ;
253+ current_entry = cursor. next ( ) . unwrap ( ) ;
254+ assert_eq ! ( current_entry , None ) ;
255255 // In the end still return None.
256- current = cursor. next ( ) . unwrap ( ) ;
257- assert_eq ! ( current , None ) ;
256+ current_entry = cursor. next ( ) . unwrap ( ) ;
257+ assert_eq ! ( current_entry , None ) ;
258258
259259 // Iterate using prev().
260260 let mut cursor = table. cursor ( & txn) . unwrap ( ) ;
261- let mut current = cursor. lower_bound ( & ( 4 , 4 ) ) . unwrap ( ) ;
262- assert_eq ! ( current , None ) ;
261+ let mut current_entry = cursor. lower_bound ( & ( 4 , 4 ) ) . unwrap ( ) ;
262+ assert_eq ! ( current_entry , None ) ;
263263 for kv_pair in SORTED_VALUES . iter ( ) . rev ( ) . cloned ( ) {
264- current = cursor. prev ( ) . unwrap ( ) ;
265- assert_eq ! ( current , Some ( kv_pair) ) ;
264+ current_entry = cursor. prev ( ) . unwrap ( ) ;
265+ assert_eq ! ( current_entry , Some ( kv_pair) ) ;
266266 }
267- current = cursor. prev ( ) . unwrap ( ) ;
268- assert_eq ! ( current , None ) ;
267+ current_entry = cursor. prev ( ) . unwrap ( ) ;
268+ assert_eq ! ( current_entry , None ) ;
269269 // In the end still return None.
270- current = cursor. prev ( ) . unwrap ( ) ;
271- assert_eq ! ( current , None ) ;
270+ current_entry = cursor. prev ( ) . unwrap ( ) ;
271+ assert_eq ! ( current_entry , None ) ;
272272}
273273
274274// Constants for random_table_test.
0 commit comments