summaryrefslogtreecommitdiffstats
path: root/src/commands/build.rs
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2021-03-04 13:34:13 +0100
committerMatthias Beyer <mail@beyermatthias.de>2021-03-04 13:34:54 +0100
commit5b46db841f74663c896c37e5f40a4ad08699ba2b (patch)
tree7eb3b4875b90d33c834efcc206ddb5952d93f915 /src/commands/build.rs
parente83155b64527de035b55d57c12c96463f0443b84 (diff)
Do not pass progress bars by value, but by reference
Because passing by value is simply not necessary here. Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Diffstat (limited to 'src/commands/build.rs')
-rw-r--r--src/commands/build.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/commands/build.rs b/src/commands/build.rs
index 85697d6..421f7ee 100644
--- a/src/commands/build.rs
+++ b/src/commands/build.rs
@@ -163,7 +163,7 @@ pub async fn build(
let p = config.releases_directory().join(storename);
debug!("Loading release directory: {}", p.display());
- let r = ReleaseStore::load(StoreRoot::new(p)?, bar_release_loading.clone());
+ let r = ReleaseStore::load(StoreRoot::new(p)?, &bar_release_loading);
if r.is_ok() {
bar_release_loading.finish_with_message("Loaded releases successfully");
} else {
@@ -208,7 +208,7 @@ pub async fn build(
}
debug!("Loading staging directory: {}", p.display());
- let r = StagingStore::load(StoreRoot::new(p.clone())?, bar_staging_loading.clone());
+ let r = StagingStore::load(StoreRoot::new(p.clone())?, &bar_staging_loading);
if r.is_ok() {
bar_staging_loading.finish_with_message("Loaded staging successfully");
} else {
@@ -220,7 +220,7 @@ pub async fn build(
let dag = {
let bar_tree_building = progressbars.bar();
bar_tree_building.set_length(max_packages);
- let dag = Dag::for_root_package(package.clone(), &repo, bar_tree_building.clone())?;
+ let dag = Dag::for_root_package(package.clone(), &repo, &bar_tree_building)?;
bar_tree_building.finish_with_message("Finished loading Dag");
dag
};