diff options
| author | Kamen Mladenov <kamen@syndamia.com> | 2025-04-16 09:46:19 +0300 |
|---|---|---|
| committer | Kamen Mladenov <kamen@syndamia.com> | 2025-04-23 17:28:22 +0300 |
| commit | fa368238729e95ade6ec907c9909e140d6322cf3 (patch) | |
| tree | 840c54fd4d656c336c4f7059dc006d839bf615c4 /zkvms_host_io/input_macros/src/lib.rs | |
| parent | 0c54fb0540591ab5ddcb4de2a2ff7fc54bd3b798 (diff) | |
| download | zkVMs-benchmarks-fa368238729e95ade6ec907c9909e140d6322cf3.tar zkVMs-benchmarks-fa368238729e95ade6ec907c9909e140d6322cf3.tar.gz zkVMs-benchmarks-fa368238729e95ade6ec907c9909e140d6322cf3.zip | |
fix(zkvms_host_io/input_macros): Add comma on public_types count
The `sep` variable is used below, in `output_type`, where the public
types are laid out. Before, we checked the count of all types, including
private ones, which caused a crash when we have no private inputs.
Diffstat (limited to 'zkvms_host_io/input_macros/src/lib.rs')
| -rw-r--r-- | zkvms_host_io/input_macros/src/lib.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/zkvms_host_io/input_macros/src/lib.rs b/zkvms_host_io/input_macros/src/lib.rs index e66a0a4..448f76e 100644 --- a/zkvms_host_io/input_macros/src/lib.rs +++ b/zkvms_host_io/input_macros/src/lib.rs @@ -66,7 +66,7 @@ static DERIVES: &str = "#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deseria pub fn generate_output_type_input_struct(_: TokenStream) -> TokenStream { let fd = new_fd(); - let sep = if fd.types().is_empty() { "" } else { ", " }; + let sep = if fd.public_types().is_empty() { "" } else { ", " }; let output_type = format!("pub type Output = ({} {} {});", fd.grouped_public_types(), sep, fd.return_type).to_string(); let return_type = format!("pub type Return = {};", fd.return_type).to_string(); |
