Skip to content

Commit

Permalink
Fix ciritcal bug in workaround mode
Browse files Browse the repository at this point in the history
Fix bug breaking type generation for sanitary structs in workaround mode
  • Loading branch information
ByteOtter committed Sep 6, 2024
1 parent 9deb057 commit 83814c0
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "thanix"
authors = ["Christopher Hock <[email protected]>"]
version = "0.1.0-beta.7"
version = "0.1.0-beta.8"
publish = true
edition = "2021"
description = "A yaml-to-rust code generator for generating Rust code from yaml config files e.g. as found in openAPI."
Expand Down
4 changes: 3 additions & 1 deletion Thanix.spec
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@


Name: Thanix
Version: 0.1.0_beta.7
Version: 0.1.0_beta.8
Release: 0.1
Summary: Rust to yaml code generator
# FIXME: Select a correct license from https://github.com/openSUSE/spec-cleaner#spdx-licenses
Expand Down Expand Up @@ -59,6 +59,8 @@ install -m 0755 %{_builddir}/%{name}-%{version}/target/release/%{bin_name} %{bui
%doc README.md

%changelog
* Fri Sep 06 2024 Christopher Hock <[email protected]> - 0.1.0_beta.8-0.1
- Fix critical bug in workflow mode breaking type generation for sanitary structs
* Fri Sep 06 2024 Christopher Hock <[email protected]> - 0.1.0_beta.7-0.1
- Fix the version module not being public in output
* Fri Sep 06 2024 Christopher Hock <[email protected]> - 0.1.0_beta.6-0.1
Expand Down
4 changes: 3 additions & 1 deletion src/structgen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@ pub fn gen(name: &str, schema: &Schema, workaround_mode: bool) -> Option<String>
&& !result.ends_with("\tpub id:")
{
result += &format!("Option<{}>", type_name);
}
} else {
result += &type_name;
}
} else {
result += &type_name;
}
Expand Down

0 comments on commit 83814c0

Please sign in to comment.