diff --git a/ci-script/Cargo.toml b/ci-script/Cargo.toml index 61169db9..4a9b649d 100644 --- a/ci-script/Cargo.toml +++ b/ci-script/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ci-script" -version = "0.1.2" +version = "0.1.4" authors = ["Émile Grégoire "] edition = "2018" diff --git a/ci-script/src/lib.rs b/ci-script/src/lib.rs index 6b5dbe14..608a67c4 100644 --- a/ci-script/src/lib.rs +++ b/ci-script/src/lib.rs @@ -129,9 +129,7 @@ fn run_builder<'a, B: BindingBuilder<'a>>( ); } - if platforms.is_empty() { - panic!("No platforms found!"); - } + assert!(!platforms.is_empty(), "No platforms found!"); let has_dynamic_libs = platforms.has_dynamic_lib(); diff --git a/generators/c-oo-bindgen/Cargo.toml b/generators/c-oo-bindgen/Cargo.toml index cb89d7ff..bb498979 100644 --- a/generators/c-oo-bindgen/Cargo.toml +++ b/generators/c-oo-bindgen/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "c-oo-bindgen" -version = "0.1.2" +version = "0.1.4" authors = ["Émile Grégoire "] edition = "2018" diff --git a/generators/c-oo-bindgen/src/lib.rs b/generators/c-oo-bindgen/src/lib.rs index eaadc25e..aeb5bbc5 100644 --- a/generators/c-oo-bindgen/src/lib.rs +++ b/generators/c-oo-bindgen/src/lib.rs @@ -1070,9 +1070,10 @@ fn get_link_dependencies(config: &CBindgenConfig) -> Vec { .output() .expect("failed to run cargo"); - if !output.status.success() { - panic!("failed to get the link dependencies"); - } + assert!( + output.status.success(), + "failed to get the link dependencies" + ); // It prints to stderr for some reason let result = String::from_utf8_lossy(&output.stderr); diff --git a/generators/dotnet-oo-bindgen/Cargo.toml b/generators/dotnet-oo-bindgen/Cargo.toml index 627a0a54..d0d209c0 100644 --- a/generators/dotnet-oo-bindgen/Cargo.toml +++ b/generators/dotnet-oo-bindgen/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "dotnet-oo-bindgen" -version = "0.1.2" +version = "0.1.4" authors = ["Émile Grégoire "] edition = "2018" diff --git a/generators/dotnet-oo-bindgen/src/class.rs b/generators/dotnet-oo-bindgen/src/class.rs index 018f7afe..d8ac00b8 100644 --- a/generators/dotnet-oo-bindgen/src/class.rs +++ b/generators/dotnet-oo-bindgen/src/class.rs @@ -377,7 +377,10 @@ fn generate_async_method( callback_name, return_type, callback_param_name ))?; blocked(f, |f| { - f.writeln(&format!("tcs.SetResult({});", callback_param_name)) + f.writeln(&format!( + "Task.Run(() => tcs.SetResult({}));", + callback_param_name + )) }) })?; diff --git a/generators/java-oo-bindgen/Cargo.toml b/generators/java-oo-bindgen/Cargo.toml index 25b0f90f..95fd7e36 100644 --- a/generators/java-oo-bindgen/Cargo.toml +++ b/generators/java-oo-bindgen/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "java-oo-bindgen" -version = "0.1.2" +version = "0.1.4" authors = ["Émile Grégoire "] edition = "2018" diff --git a/generators/rust-oo-bindgen/Cargo.toml b/generators/rust-oo-bindgen/Cargo.toml index 147ffb35..315fa0f7 100644 --- a/generators/rust-oo-bindgen/Cargo.toml +++ b/generators/rust-oo-bindgen/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rust-oo-bindgen" -version = "0.1.2" +version = "0.1.4" authors = ["Émile Grégoire "] edition = "2018" diff --git a/oo-bindgen/Cargo.toml b/oo-bindgen/Cargo.toml index ecf4e44d..83dc10a9 100644 --- a/oo-bindgen/Cargo.toml +++ b/oo-bindgen/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "oo-bindgen" -version = "0.1.2" +version = "0.1.4" authors = ["Émile Grégoire "] edition = "2018"