Skip to content

Commit 6801e88

Browse files
committed
Fix up a few things
1 parent 297b70e commit 6801e88

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/cw-schema-codegen/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,4 @@ insta = "1.40.0"
2828
rand = { version = "0.8.5", features = ["min_const_gen"] }
2929
serde = { workspace = true, features = ["derive"] }
3030
serde_json = "1.0.128"
31+
tempfile = "3.14.0"

packages/cw-schema-codegen/tests/python_tpl.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ fn simple_enum() {
5656

5757
macro_rules! validator {
5858
($typ:ty) => {{
59-
let a: Box<dyn FnOnce(&str) -> ()> = Box::new(|output| {
59+
let a: Box<dyn FnOnce(&str)> = Box::new(|output| {
6060
serde_json::from_str::<$typ>(output).unwrap();
6161
});
6262
a
@@ -130,7 +130,7 @@ fn assert_validity() {
130130

131131
let mut file = tempfile::NamedTempFile::with_suffix(".py").unwrap();
132132
file.write_all(schema_output.as_bytes()).unwrap();
133-
file.write(
133+
file.write_all(
134134
format!(
135135
"import sys; print({type_name}.model_validate_json('{example}').model_dump_json())"
136136
)

0 commit comments

Comments
 (0)