Merge pull request #503 from matthiasbeyer/libimagstore/storeid-display-fix

Fix Display impl for StoreId by using lossy string rep if PathBuf::to…
This commit is contained in:
Matthias Beyer 2016-07-05 15:25:23 +02:00 committed by GitHub
commit dd4349f24f

View file

@ -46,7 +46,7 @@ impl Display for StoreId {
fn fmt(&self, fmt: &mut Formatter) -> RResult<(), FmtError> { fn fmt(&self, fmt: &mut Formatter) -> RResult<(), FmtError> {
match self.0.to_str() { match self.0.to_str() {
Some(s) => write!(fmt, "{}", s), Some(s) => write!(fmt, "{}", s),
None => write!(fmt, "<non-UTF8-StoreId>"), // TODO: Sure here? None => write!(fmt, "{}", self.0.to_string_lossy()),
} }
} }