mirror of
https://github.com/Dummi26/mers.git
synced 2026-03-04 08:36:33 +01:00
improve function type display
This commit is contained in:
@@ -133,6 +133,11 @@ impl Display for Function {
|
||||
}
|
||||
impl Display for FunctionT {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
write!(f, "Function")
|
||||
match (self.0)(&Type::empty_tuple()) {
|
||||
Ok(t) => write!(f, "Function /* () -> {t} */"),
|
||||
Err(_) => {
|
||||
write!(f, "Function",)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user