Aqua: remove -> () + CI: add automatic releases (#92)

This commit is contained in:
folex
2021-06-09 23:21:08 +03:00
committed by GitHub
parent 17eedfd525
commit 56a53d3b08
11 changed files with 147 additions and 68 deletions

View File

@ -1,7 +1,7 @@
[package]
name = "marine-module-interface"
description = "Fluence Marine module interface"
version = "0.1.2"
version = "0.1.3"
authors = ["Fluence Labs"]
license = "Apache-2.0"
edition = "2018"

View File

@ -69,9 +69,9 @@ impl fmt::Display for FunctionSignature {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
use itertools::Itertools;
let output = match self.output_types.len() {
0 => "()",
1 => &self.output_types[0],
let (designator, output) = match self.output_types.len() {
0 => ("", ""),
1 => ("->", self.output_types[0].as_str()),
_ => unimplemented!("more than 1 output type is unsupported"),
};
@ -80,7 +80,7 @@ impl fmt::Display for FunctionSignature {
.iter()
.map(|(name, ty)| format!("{}: {}", name, ty))
.format(", ");
writeln!(f, "{}({}) -> {}", self.name, args, output)
writeln!(f, "{}({}) {} {}", self.name, args, designator, output)
}
}