fix: impl display for upmultihash, fix preview debug log

feat/type-attributes
Tomáš Mládek 2023-08-20 17:34:35 +02:00
parent 30d0a4e8ba
commit 8f1a9f8473
2 changed files with 7 additions and 1 deletions

View File

@ -35,6 +35,12 @@ impl UpMultihash {
}
}
impl std::fmt::Display for UpMultihash {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(f, "{}", b58_encode(self.to_bytes()))
}
}
pub(crate) type LargeMultihash = multihash::MultihashGeneric<256>;
impl From<LargeMultihash> for UpMultihash {

View File

@ -81,7 +81,7 @@ impl PreviewStore {
options: HashMap<String, String>,
mut job_container: JobContainer,
) -> Result<Option<PathBuf>> {
debug!("Preview for {hash:?} requested...");
debug!("Preview for {hash} requested...");
let path_mutex = self.get_path(&hash, &options);
let thumbpath = path_mutex.lock().unwrap();
if thumbpath.exists() {