summaryrefslogtreecommitdiffstats
path: root/src/filestore/staging.rs
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2020-11-06 13:21:27 +0100
committerMatthias Beyer <mail@beyermatthias.de>2020-11-06 13:27:12 +0100
commit228e2a2836f12227dfe2b1725eff123d774670f9 (patch)
tree69d9d41ded2991e0ed50dc34eabde5a26bfef9de /src/filestore/staging.rs
parent61e72a6c2d7861998a170247a78be65415dd71e8 (diff)
Implement Debug for store frontend types
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Diffstat (limited to 'src/filestore/staging.rs')
-rw-r--r--src/filestore/staging.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/filestore/staging.rs b/src/filestore/staging.rs
index 9831c3f..8b6de55 100644
--- a/src/filestore/staging.rs
+++ b/src/filestore/staging.rs
@@ -1,5 +1,7 @@
use std::path::Path;
use std::path::PathBuf;
+use std::fmt::Debug;
+
use anyhow::Result;
use anyhow::Error;
use indicatif::ProgressBar;
@@ -13,6 +15,12 @@ use crate::filestore::Artifact;
// The implementation of this type must be available in the merged filestore.
pub struct StagingStore(pub (in crate::filestore) FileStoreImpl);
+impl Debug for StagingStore {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> std::result::Result<(), std::fmt::Error> {
+ write!(f, "StagingStore(root: {})", self.0.root.display())
+ }
+}
+
impl StagingStore {
pub fn load(root: &Path, progress: ProgressBar) -> Result<Self> {
FileStoreImpl::load(root, progress).map(StagingStore)