[6/8] Clean up an unnecessary clone
diff mbox series

Message ID 20180720115728.19312-6-ruscur@russell.cc
State Accepted
Headers show
Series
  • [1/8] Convert from hyper to reqwest
Related show

Commit Message

Russell Currey July 20, 2018, 11:57 a.m. UTC
Signed-off-by: Russell Currey <ruscur@russell.cc>
---
 src/main.rs | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

Comments

Andrew Donnellan July 23, 2018, 1:07 a.m. UTC | #1
On 20/07/18 21:57, Russell Currey wrote:
> Signed-off-by: Russell Currey <ruscur@russell.cc>

Reviewed-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>

> ---
>   src/main.rs | 12 +-----------
>   1 file changed, 1 insertion(+), 11 deletions(-)
> 
> diff --git a/src/main.rs b/src/main.rs
> index 027ceae..5d34b36 100644
> --- a/src/main.rs
> +++ b/src/main.rs
> @@ -251,22 +251,12 @@ fn test_patch(
>           let settings = settings.clone();
>           let project = project.clone();
>           let client = client.clone();
> -        let settings_clone = settings.clone();
>           let test_all_branches = project.test_all_branches.unwrap_or(true);
>   
>           // We've set up a remote branch, time to kick off tests
>           let test = thread::Builder::new()
>               .name(tag.to_string())
> -            .spawn(move || {
> -                run_tests(
> -                    &settings_clone,
> -                    client,
> -                    &project,
> -                    &tag,
> -                    &branch_name,
> -                    hefty_tests,
> -                )
> -            })
> +            .spawn(move || run_tests(&settings, client, &project, &tag, &branch_name, hefty_tests))
>               .unwrap();
>           results.append(&mut test.join().unwrap());
>   
>

Patch
diff mbox series

diff --git a/src/main.rs b/src/main.rs
index 027ceae..5d34b36 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -251,22 +251,12 @@  fn test_patch(
         let settings = settings.clone();
         let project = project.clone();
         let client = client.clone();
-        let settings_clone = settings.clone();
         let test_all_branches = project.test_all_branches.unwrap_or(true);
 
         // We've set up a remote branch, time to kick off tests
         let test = thread::Builder::new()
             .name(tag.to_string())
-            .spawn(move || {
-                run_tests(
-                    &settings_clone,
-                    client,
-                    &project,
-                    &tag,
-                    &branch_name,
-                    hefty_tests,
-                )
-            })
+            .spawn(move || run_tests(&settings, client, &project, &tag, &branch_name, hefty_tests))
             .unwrap();
         results.append(&mut test.join().unwrap());