one line anyhow error formatting

This commit is contained in:
Igor Katson 2024-09-13 12:36:32 +01:00
parent 06613d9ef1
commit a73f921c5f
No known key found for this signature in database
GPG key ID: B4EC22B66D61A3F5
4 changed files with 9 additions and 9 deletions

View file

@ -72,7 +72,7 @@ impl<'de> Deserialize<'de> for TorrentIdOrHash {
macro_rules! visit_int {
($v:expr) => {{
let tid: TorrentId = $v.try_into().map_err(|e| E::custom(format!("{e:?}")))?;
let tid: TorrentId = $v.try_into().map_err(|e| E::custom(format!("{e:#}")))?;
Ok(TorrentIdOrHash::from(tid))
}};
}
@ -118,7 +118,7 @@ impl<'de> Deserialize<'de> for TorrentIdOrHash {
{
TorrentIdOrHash::parse(v).map_err(|e| {
E::custom(format!(
"expected integer or 40 byte info hash, couldn't parse string: {e:?}"
"expected integer or 40 byte info hash, couldn't parse string: {e:#}"
))
})
}