@@ -154,11 +154,12 @@ fn generate_replication_configuration(
154
154
#[ cfg( feature = "enterprise" ) ]
155
155
pub struct ReplicationTwoDbsTester {
156
156
_tmp_dir : TempDir ,
157
- _leak_checker : LeakChecker ,
158
157
pub local_database : Database ,
159
158
central_database : Database ,
160
159
replicator : Replicator ,
161
160
replicator_continuous : bool ,
161
+ // Keep _leak_checker at the end, fields in a struct are dropped in declaration order
162
+ _leak_checker : LeakChecker ,
162
163
}
163
164
164
165
#[ cfg( feature = "enterprise" ) ]
@@ -206,11 +207,11 @@ impl ReplicationTwoDbsTester {
206
207
// Return
207
208
Self {
208
209
_tmp_dir : tmp_dir,
209
- _leak_checker : LeakChecker :: new ( ) ,
210
210
local_database,
211
211
central_database,
212
212
replicator,
213
213
replicator_continuous,
214
+ _leak_checker : LeakChecker :: new ( ) ,
214
215
}
215
216
}
216
217
@@ -279,14 +280,15 @@ impl Drop for ReplicationTwoDbsTester {
279
280
#[ cfg( feature = "enterprise" ) ]
280
281
pub struct ReplicationThreeDbsTester {
281
282
_tmp_dir : TempDir ,
282
- _leak_checker : LeakChecker ,
283
283
local_database_1 : Database ,
284
284
local_database_2 : Database ,
285
285
central_database : Database ,
286
286
replicator_1 : Replicator ,
287
287
replicator_1_continuous : bool ,
288
288
replicator_2 : Replicator ,
289
289
replicator_2_continuous : bool ,
290
+ // Keep _leak_checker at the end, fields in a struct are dropped in declaration order
291
+ _leak_checker : LeakChecker ,
290
292
}
291
293
292
294
#[ cfg( feature = "enterprise" ) ]
@@ -353,14 +355,14 @@ impl ReplicationThreeDbsTester {
353
355
// Return
354
356
Self {
355
357
_tmp_dir : tmp_dir,
356
- _leak_checker : LeakChecker :: new ( ) ,
357
358
local_database_1,
358
359
local_database_2,
359
360
central_database,
360
361
replicator_1,
361
362
replicator_1_continuous,
362
363
replicator_2,
363
364
replicator_2_continuous,
365
+ _leak_checker : LeakChecker :: new ( ) ,
364
366
}
365
367
}
366
368
0 commit comments