diff --git a/libcoap-sys/build.rs b/libcoap-sys/build.rs index 6be699d..0673b2f 100644 --- a/libcoap-sys/build.rs +++ b/libcoap-sys/build.rs @@ -50,9 +50,9 @@ fn main() { let apostrophe_remover = regex::Regex::new(r##"^"(?.*)"$"##).unwrap(); let esp_clang_args = arg_splitter.split( esp_include_path.args.as_str() - ).map(|x| apostrophe_remover.replace(x.trim(), "$content")); - bindgen_builder = bindgen_builder.clang_args(esp_clang_args).clang_arg("-target").clang_arg("xtensa").clang_arg("-DESP_PLATFORM"); - for arg in esp_clang_args { + ).map(|x| apostrophe_remover.replace(x.trim(), "$content")).collect::>::(); + bindgen_builder = bindgen_builder.clang_args(&esp_clang_args).clang_arg("-target").clang_arg("xtensa").clang_arg("-DESP_PLATFORM"); + for arg in &esp_clang_args { println!("cargo:warning={}", arg); }