summaryrefslogtreecommitdiffstats
path: root/src/repository
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2020-05-18 21:26:26 +0200
committerMatthias Beyer <mail@beyermatthias.de>2020-05-18 21:26:26 +0200
commitaf70970f292a33063d8a8cbc918f12fd70b15f4f (patch)
treee6faf6d7b8ab3efab8133cff231dee97c0486d70 /src/repository
parent843807510e27c51a33d290f726c8eb3b150b2799 (diff)
Make types Debug
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Diffstat (limited to 'src/repository')
-rw-r--r--src/repository/client.rs9
-rw-r--r--src/repository/repository.rs2
2 files changed, 9 insertions, 2 deletions
diff --git a/src/repository/client.rs b/src/repository/client.rs
index 841625d..f5917d4 100644
--- a/src/repository/client.rs
+++ b/src/repository/client.rs
@@ -1,6 +1,7 @@
use std::io::Cursor;
use std::sync::Arc;
use std::ops::Deref;
+use std::result::Result as RResult;
use ipfs_api::IpfsClient;
use anyhow::Error;
@@ -30,6 +31,12 @@ use crate::types::util::IPNSHash;
#[derive(Clone)]
pub struct ClientFassade(Arc<IpfsClient>);
+impl std::fmt::Debug for ClientFassade {
+ fn fmt(&self, f: &mut std::fmt::Formatter) -> RResult<(), std::fmt::Error> {
+ write!(f, "ClientFassade")
+ }
+}
+
impl ClientFassade {
fn new(host: &str, port: u16) -> Result<ClientFassade, Error> {
debug!("Creating new ClientFassade object: {}:{}", host, port);
@@ -81,7 +88,7 @@ impl ClientFassade {
}
/// Client wrapper for working with types directly on the client
-#[derive(Clone)]
+#[derive(Debug, Clone)]
pub struct TypedClientFassade(ClientFassade);
impl Deref for TypedClientFassade {
diff --git a/src/repository/repository.rs b/src/repository/repository.rs
index a63c2d6..cc940c6 100644
--- a/src/repository/repository.rs
+++ b/src/repository/repository.rs
@@ -27,7 +27,7 @@ use crate::repository::client::TypedClientFassade;
///
/// Should not be used too extensively, but rather through the "Profile" type, which represents the
/// profile of a user.
-#[derive(Clone)]
+#[derive(Debug, Clone)]
pub struct Repository(TypedClientFassade);
impl Deref for Repository {