We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 159fe96 commit 02da653Copy full SHA for 02da653
src/lib.rs
@@ -881,10 +881,6 @@ impl Builder {
881
}
882
883
let mut child = cmd.spawn()?;
884
- if !child.wait()?.success() {
885
- return Err(io::Error::new(io::ErrorKind::Other,
886
- "clang exited with non-zero status"));
887
- }
888
889
let mut preprocessed = child.stdout.take().unwrap();
890
let mut file = File::create(if is_cpp {
@@ -893,7 +889,13 @@ impl Builder {
893
"__bindgen.i"
894
})?;
895
891
io::copy(&mut preprocessed, &mut file)?;
896
- Ok(())
892
+
+ if child.wait()?.success() {
+ Ok(())
+ } else {
+ Err(io::Error::new(io::ErrorKind::Other,
897
+ "clang exited with non-zero status"))
898
+ }
899
900
901
0 commit comments