From 9cac11872c3b62362ac884a8ac0151581076b99a Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Tue, 15 Jun 2021 20:58:19 +0200 Subject: run(): Only clone repo name if we need it for error context This avoids cloning names of repos that are processed successfully. --- src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/main.rs b/src/main.rs index 20efb18..2de21b9 100644 --- a/src/main.rs +++ b/src/main.rs @@ -122,7 +122,7 @@ fn run() -> Result<(), MultiError> { .par_iter() .map(|repo| { ( - repo.name.clone(), + &repo.name, process_repo( &repo, &db, @@ -139,7 +139,7 @@ fn run() -> Result<(), MultiError> { error .err() .unwrap() - .context(name) + .context(name.clone()) }) .collect(); -- cgit v1.2.3