Do not print hash in debug builds

This commit is contained in:
CreepySkeleton 2020-04-24 19:19:36 +03:00
parent 6febd2b582
commit 1bbcfe2261

View file

@ -47,8 +47,11 @@ impl Id {
impl Debug for Id {
fn fmt(&self, f: &mut Formatter) -> Result {
#[cfg(debug_assertions)]
write!(f, "{:?} ", self.name)?;
write!(f, "[hash: {}]", self.id)
write!(f, "{}", self.name)?;
#[cfg(not(debug_assertions))]
write!(f, "[hash: {}]", self.id)?;
Ok(())
}
}