Fix closure "either" type display implementation (#4585)

This commit is contained in:
Micha de Vries 2024-08-22 17:24:11 +01:00 committed by GitHub
parent 1294a674bc
commit 208d6a897e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -71,7 +71,11 @@ impl fmt::Display for Closure {
if i > 0 {
f.write_str(", ")?;
}
write!(f, "${name}: {kind}")?;
write!(f, "${name}: ")?;
match kind {
k @ Kind::Either(_) => write!(f, "<{}>", k)?,
k => write!(f, "{}", k)?,
}
}
f.write_str("|")?;
if let Some(returns) = &self.returns {