diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2021-03-04 13:34:13 +0100 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2021-03-04 13:34:54 +0100 |
commit | 5b46db841f74663c896c37e5f40a4ad08699ba2b (patch) | |
tree | 7eb3b4875b90d33c834efcc206ddb5952d93f915 /src/filestore | |
parent | e83155b64527de035b55d57c12c96463f0443b84 (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/filestore')
-rw-r--r-- | src/filestore/release.rs | 2 | ||||
-rw-r--r-- | src/filestore/staging.rs | 2 | ||||
-rw-r--r-- | src/filestore/util.rs | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/src/filestore/release.rs b/src/filestore/release.rs index a30c86e..a990821 100644 --- a/src/filestore/release.rs +++ b/src/filestore/release.rs @@ -27,7 +27,7 @@ impl Debug for ReleaseStore { } impl ReleaseStore { - pub fn load(root: StoreRoot, progress: ProgressBar) -> Result<Self> { + pub fn load(root: StoreRoot, progress: &ProgressBar) -> Result<Self> { FileStoreImpl::load(root, progress).map(ReleaseStore) } diff --git a/src/filestore/staging.rs b/src/filestore/staging.rs index 1c2a848..9e98e25 100644 --- a/src/filestore/staging.rs +++ b/src/filestore/staging.rs @@ -33,7 +33,7 @@ impl Debug for StagingStore { } impl StagingStore { - pub fn load(root: StoreRoot, progress: ProgressBar) -> Result<Self> { + pub fn load(root: StoreRoot, progress: &ProgressBar) -> Result<Self> { FileStoreImpl::load(root, progress).map(StagingStore) } diff --git a/src/filestore/util.rs b/src/filestore/util.rs index 53f5919..ec6ecfd 100644 --- a/src/filestore/util.rs +++ b/src/filestore/util.rs @@ -31,8 +31,8 @@ pub struct FileStoreImpl { } impl FileStoreImpl { - /// Loads the passed path recursively - pub fn load(root: StoreRoot, progress: ProgressBar) -> Result<Self> { + /// Loads the passed path recursively + pub fn load(root: StoreRoot, progress: &ProgressBar) -> Result<Self> { let store = root .find_artifacts_recursive() .inspect(|path| { |