Skip to content

Commit

Permalink
relaxed constraints on traits
Browse files Browse the repository at this point in the history
  • Loading branch information
dkijania committed Aug 11, 2020
1 parent 775dc78 commit 65a56c3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions src/load/mod.rs
Expand Up @@ -47,8 +47,8 @@ pub fn start_sync(
}

pub fn start_async(
request_generator: impl RequestGenerator + Clone + Send + Sized + 'static,
status_provider: impl RequestStatusProvider + Clone + Send + Sized + Sync + 'static,
request_generator: impl RequestGenerator + Send + Sized + 'static,
status_provider: impl RequestStatusProvider + Send + Sized + Sync + 'static,
config: Configuration,
title: &str,
) -> Stats {
Expand Down Expand Up @@ -84,7 +84,7 @@ pub fn start_async(

fn get_threads(
request_generator: &Arc<
Mutex<impl RequestGenerator + std::clone::Clone + Send + Sized + 'static>,
Mutex<impl RequestGenerator + Send + Sized + 'static>,
>,
config: &Configuration,
request_mode_run: RequestSendMode,
Expand Down Expand Up @@ -122,7 +122,7 @@ fn per_thread_strategy(
config: &Configuration,
request_mode_run: RequestSendMode,
request_generator: &Arc<
Mutex<impl RequestGenerator + std::clone::Clone + Send + Sized + 'static>,
Mutex<impl RequestGenerator + Send + Sized + 'static>,
>,
) -> Vec<JoinHandle<()>> {
let mut child_threads = Vec::new();
Expand All @@ -149,7 +149,7 @@ fn duration_strategy(
config: &Configuration,
request_mode_run: RequestSendMode,
request_generator: &Arc<
Mutex<impl RequestGenerator + std::clone::Clone + Send + Sized + 'static>,
Mutex<impl RequestGenerator + Send + Sized + 'static>,
>,
) -> Vec<JoinHandle<()>> {
let mut child_threads = Vec::new();
Expand Down
4 changes: 2 additions & 2 deletions src/load/status.rs
Expand Up @@ -94,7 +94,7 @@ pub trait RequestStatusProvider {

fn update_statuses(
responses_clone: &Arc<Mutex<Vec<Response>>>,
request_status_provider: &Arc<Mutex<impl RequestStatusProvider + Clone + Send + Sized + Sync>>,
request_status_provider: &Arc<Mutex<impl RequestStatusProvider + Send + Sized + Sync>>,
) -> Vec<Status> {
let responses = &mut *responses_clone.lock().unwrap();
let ids: Vec<Id> = responses
Expand All @@ -119,7 +119,7 @@ impl StatusUpdaterThread {
pub fn spawn(
responses: &Arc<Mutex<Vec<Response>>>,
request_status_provider: &Arc<
Mutex<impl RequestStatusProvider + Clone + Send + Sized + Sync + 'static>,
Mutex<impl RequestStatusProvider + Send + Sized + Sync + 'static>,
>,
monitor: Monitor,
title: &str,
Expand Down

0 comments on commit 65a56c3

Please sign in to comment.