summaryrefslogtreecommitdiff
path: root/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 10bdc6f9..1170f9b0 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -492,7 +492,7 @@ impl Builder {
}
if !self.options.rustfmt_bindings {
- output_vector.push("--rustfmt-bindings".into());
+ output_vector.push("--no-rustfmt-bindings".into());
}
if let Some(path) = self.options
@@ -1412,7 +1412,7 @@ impl Default for BindgenOptions {
enable_mangling: true,
prepend_enum_name: true,
time_phases: false,
- rustfmt_bindings: false,
+ rustfmt_bindings: true,
rustfmt_configuration_file: None,
no_partialeq_types: Default::default(),
}
@@ -1604,10 +1604,8 @@ impl Bindings {
let rustfmt = if let Ok(rustfmt) = which::which("rustfmt") {
rustfmt
} else {
- return Err(io::Error::new(
- io::ErrorKind::Other,
- "Rustfmt activated, but it could not be found in global path.",
- ));
+ warn!("Not running rustfmt because it does not exist in PATH");
+ return Ok(());
};
let mut cmd = Command::new(rustfmt);