mirror of
https://github.com/fluencelabs/marine.git
synced 2025-06-22 03:01:46 +00:00
Improve function signatures in aqua command (#88)
This commit is contained in:
@ -56,12 +56,12 @@ impl fmt::Display for FunctionSignature {
|
||||
_ => unimplemented!("more than 1 output type is unsupported"),
|
||||
};
|
||||
|
||||
if self.arguments.is_empty() {
|
||||
writeln!(f, "{}: -> {}", self.name, output)
|
||||
} else {
|
||||
let args = self.arguments.iter().map(|(_, ty)| ty).format(",");
|
||||
writeln!(f, "{}: {} -> {}", self.name, args, output)
|
||||
}
|
||||
let args = self
|
||||
.arguments
|
||||
.iter()
|
||||
.map(|(name, ty)| format!("{}: {}", name, ty))
|
||||
.format(", ");
|
||||
writeln!(f, "{}({}) -> {}", self.name, args, output)
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user