Fix Display impl for StoreId by using lossy string rep if PathBuf::to_str() fails
This commit is contained in:
parent
1211a99775
commit
580ea28877
1 changed files with 1 additions and 1 deletions
|
@ -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()),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue