From f190bdb6662f22a13bb266f34d4dae5300b699cc Mon Sep 17 00:00:00 2001 From: Ryo Yamashita Date: Mon, 3 Apr 2023 17:16:36 +0900 Subject: [PATCH] =?UTF-8?q?`impl=20Iterator`=20=E2=86=92=20`impl=20IntoIte?= =?UTF-8?q?rator`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crates/open_jtalk-sys/build.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/crates/open_jtalk-sys/build.rs b/crates/open_jtalk-sys/build.rs index 89643be..a920308 100644 --- a/crates/open_jtalk-sys/build.rs +++ b/crates/open_jtalk-sys/build.rs @@ -62,24 +62,25 @@ fn main() { let lib_dir = dst_dir.join("lib"); println!("cargo:rustc-link-search={}", lib_dir.display()); println!("cargo:rustc-link-lib=openjtalk"); - generate_bindings(dst_dir.join("include"), include_dirs.iter()); + generate_bindings(dst_dir.join("include"), include_dirs); } #[cfg(not(feature = "generate-bindings"))] #[allow(unused_variables)] fn generate_bindings( allow_dir: impl AsRef, - include_dirs: impl Iterator>, + include_dirs: impl IntoIterator>, ) { } #[cfg(feature = "generate-bindings")] fn generate_bindings( allow_dir: impl AsRef, - include_dirs: impl Iterator>, + include_dirs: impl IntoIterator>, ) { let include_dir = allow_dir.as_ref(); let clang_args = include_dirs + .into_iter() .map(|dir| format!("-I{}", dir.as_ref().display())) .chain([format!("-I{}", include_dir.display())]) .collect::>();