diff --git a/libimagstore/src/storeid.rs b/libimagstore/src/storeid.rs index 147b80cb..ce999893 100644 --- a/libimagstore/src/storeid.rs +++ b/libimagstore/src/storeid.rs @@ -4,7 +4,7 @@ use std::borrow::Borrow; use std::ops::Deref; use semver::Version; -use std::fmt::{Debug, Formatter}; +use std::fmt::{Display, Debug, Formatter}; use std::fmt::Error as FmtError; use std::result::Result as RResult; @@ -24,6 +24,17 @@ impl Into for StoreId { } +impl Display for StoreId { + + fn fmt(&self, fmt: &mut Formatter) -> RResult<(), FmtError> { + match self.0.to_str() { + Some(s) => write!(fmt, "{}", s), + None => write!(fmt, ""), // TODO: Sure here? + } + } + +} + impl Deref for StoreId { type Target = PathBuf;