diff --git a/src/database/alert_dao.rs b/src/database/alert_dao.rs index db87031..30c7bc1 100644 --- a/src/database/alert_dao.rs +++ b/src/database/alert_dao.rs @@ -325,7 +325,7 @@ mod tests { let database = Arc::new(Database::new( Connection::open_in_memory().expect("Couldn't create database!"), )); - let alert_dao = AlertDaoImpl::new(database.clone()); + let alert_dao = AlertDaoImpl::new(database); let symptoms = PublicSymptoms { report_time: UnixTime { value: 0 }, @@ -369,7 +369,7 @@ mod tests { let database = Arc::new(Database::new( Connection::open_in_memory().expect("Couldn't create database!"), )); - let alert_dao = AlertDaoImpl::new(database.clone()); + let alert_dao = AlertDaoImpl::new(database); let symptoms = PublicSymptoms { report_time: UnixTime { value: 0 }, @@ -424,7 +424,7 @@ mod tests { let database = Arc::new(Database::new( Connection::open_in_memory().expect("Couldn't create database!"), )); - let alert_dao = AlertDaoImpl::new(database.clone()); + let alert_dao = AlertDaoImpl::new(database); let symptoms = PublicSymptoms { report_time: UnixTime { value: 0 }, @@ -480,7 +480,7 @@ mod tests { let database = Arc::new(Database::new( Connection::open_in_memory().expect("Couldn't create database!"), )); - let alert_dao = AlertDaoImpl::new(database.clone()); + let alert_dao = AlertDaoImpl::new(database); let symptoms = PublicSymptoms { report_time: UnixTime { value: 0 }, @@ -538,7 +538,7 @@ mod tests { let database = Arc::new(Database::new( Connection::open_in_memory().expect("Couldn't create database!"), )); - let alert_dao = AlertDaoImpl::new(database.clone()); + let alert_dao = AlertDaoImpl::new(database); let symptoms = PublicSymptoms { report_time: UnixTime { value: 0 }, @@ -599,7 +599,7 @@ mod tests { let database = Arc::new(Database::new( Connection::open_in_memory().expect("Couldn't create database!"), )); - let alert_dao = AlertDaoImpl::new(database.clone()); + let alert_dao = AlertDaoImpl::new(database); let symptoms = PublicSymptoms { report_time: UnixTime { value: 0 }, @@ -652,7 +652,7 @@ mod tests { let database = Arc::new(Database::new( Connection::open_in_memory().expect("Couldn't create database!"), )); - let alert_dao = AlertDaoImpl::new(database.clone()); + let alert_dao = AlertDaoImpl::new(database); let symptoms = PublicSymptoms { report_time: UnixTime { value: 0 }, @@ -705,7 +705,7 @@ mod tests { let database = Arc::new(Database::new( Connection::open_in_memory().expect("Couldn't create database!"), )); - let alert_dao = AlertDaoImpl::new(database.clone()); + let alert_dao = AlertDaoImpl::new(database); let symptoms = PublicSymptoms { report_time: UnixTime { value: 0 }, diff --git a/src/database/preferences.rs b/src/database/preferences.rs index c8c24aa..2c189e2 100644 --- a/src/database/preferences.rs +++ b/src/database/preferences.rs @@ -236,7 +236,7 @@ mod tests { let database = Arc::new(Database::new( Connection::open_in_memory().expect("Couldn't create database!"), )); - let preferences_dao = PreferencesDao::new(database.clone()); + let preferences_dao = PreferencesDao::new(database); let preferences = PreferencesImpl { dao: preferences_dao, }; @@ -258,7 +258,7 @@ mod tests { let database = Arc::new(Database::new( Connection::open_in_memory().expect("Couldn't create database!"), )); - let preferences_dao = PreferencesDao::new(database.clone()); + let preferences_dao = PreferencesDao::new(database); let preferences = PreferencesImpl { dao: preferences_dao, }; @@ -275,7 +275,7 @@ mod tests { let database = Arc::new(Database::new( Connection::open_in_memory().expect("Couldn't create database!"), )); - let preferences_dao = PreferencesDao::new(database.clone()); + let preferences_dao = PreferencesDao::new(database); let preferences = PreferencesImpl { dao: preferences_dao, }; diff --git a/src/database/tcn_dao.rs b/src/database/tcn_dao.rs index 5cbb156..b89217d 100644 --- a/src/database/tcn_dao.rs +++ b/src/database/tcn_dao.rs @@ -172,7 +172,7 @@ mod tests { let database = Arc::new(Database::new( Connection::open_in_memory().expect("Couldn't create database!"), )); - let tcn_dao = TcnDaoImpl::new(database.clone()); + let tcn_dao = TcnDaoImpl::new(database); let observed_tcn = ObservedTcn { tcn: TemporaryContactNumber([ @@ -202,7 +202,7 @@ mod tests { let database = Arc::new(Database::new( Connection::open_in_memory().expect("Couldn't create database!"), )); - let tcn_dao = TcnDaoImpl::new(database.clone()); + let tcn_dao = TcnDaoImpl::new(database); let observed_tcn_1 = ObservedTcn { tcn: TemporaryContactNumber([ @@ -258,7 +258,7 @@ mod tests { let database = Arc::new(Database::new( Connection::open_in_memory().expect("Couldn't create database!"), )); - let tcn_dao = Arc::new(TcnDaoImpl::new(database.clone())); + let tcn_dao = Arc::new(TcnDaoImpl::new(database)); let stored_tcn1 = ObservedTcn { tcn: TemporaryContactNumber([0; 16]), @@ -316,7 +316,7 @@ mod tests { let database = Arc::new(Database::new( Connection::open_in_memory().expect("Couldn't create database!"), )); - let tcn_dao = Arc::new(TcnDaoImpl::new(database.clone())); + let tcn_dao = Arc::new(TcnDaoImpl::new(database)); let batches_manager = TcnBatchesManager::new(tcn_dao.clone(), ExposureGrouper { threshold: 1000 }); diff --git a/src/tcn_recording/tcn_batches_manager.rs b/src/tcn_recording/tcn_batches_manager.rs index d0ffd39..79ae20c 100644 --- a/src/tcn_recording/tcn_batches_manager.rs +++ b/src/tcn_recording/tcn_batches_manager.rs @@ -196,7 +196,7 @@ mod tests { let database = Arc::new(Database::new( Connection::open_in_memory().expect("Couldn't create database!"), )); - let tcn_dao = TcnDaoImpl::new(database.clone()); + let tcn_dao = TcnDaoImpl::new(database); let batches_manager = TcnBatchesManager::new(Arc::new(tcn_dao), ExposureGrouper { threshold: 1000 }); @@ -242,7 +242,7 @@ mod tests { let database = Arc::new(Database::new( Connection::open_in_memory().expect("Couldn't create database!"), )); - let tcn_dao = TcnDaoImpl::new(database.clone()); + let tcn_dao = TcnDaoImpl::new(database); let batches_manager = TcnBatchesManager::new(Arc::new(tcn_dao), ExposureGrouper { threshold: 1000 }); @@ -268,7 +268,7 @@ mod tests { let database = Arc::new(Database::new( Connection::open_in_memory().expect("Couldn't create database!"), )); - let tcn_dao = Arc::new(TcnDaoImpl::new(database.clone())); + let tcn_dao = Arc::new(TcnDaoImpl::new(database)); let batches_manager = TcnBatchesManager::new(tcn_dao.clone(), ExposureGrouper { threshold: 1000 }); @@ -299,7 +299,7 @@ mod tests { let database = Arc::new(Database::new( Connection::open_in_memory().expect("Couldn't create database!"), )); - let tcn_dao = Arc::new(TcnDaoImpl::new(database.clone())); + let tcn_dao = Arc::new(TcnDaoImpl::new(database)); let batches_manager = TcnBatchesManager::new(tcn_dao.clone(), ExposureGrouper { threshold: 1000 }); @@ -352,7 +352,7 @@ mod tests { let database = Arc::new(Database::new( Connection::open_in_memory().expect("Couldn't create database!"), )); - let tcn_dao = Arc::new(TcnDaoImpl::new(database.clone())); + let tcn_dao = Arc::new(TcnDaoImpl::new(database)); let batches_manager = TcnBatchesManager::new(tcn_dao.clone(), ExposureGrouper { threshold: 1000 }); @@ -419,7 +419,7 @@ mod tests { let database = Arc::new(Database::new( Connection::open_in_memory().expect("Couldn't create database!"), )); - let tcn_dao = Arc::new(TcnDaoImpl::new(database.clone())); + let tcn_dao = Arc::new(TcnDaoImpl::new(database)); let batches_manager = TcnBatchesManager::new(tcn_dao.clone(), ExposureGrouper { threshold: 1000 });