Make clean::Constant display respect f.alternate()

This commit is contained in:
varkor 2019-03-18 19:29:25 +00:00
parent 9925d9b3b6
commit b39e664ee8

View file

@ -261,7 +261,9 @@ impl fmt::Display for clean::Lifetime {
impl fmt::Display for clean::Constant {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(f, "{}: {}", self.expr, self.type_)
fmt::Display::fmt(&self.expr, f)?;
f.write_str(": ")?;
fmt::Display::fmt(&self.type_, f)
}
}