summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTed Mielczarek <ted@mielczarek.org>2019-01-25 11:57:34 -0500
committerTed Mielczarek <ted@mielczarek.org>2019-01-25 12:03:22 -0500
commit4697025c25dbab8029e1fb36280ad46c88b1ad73 (patch)
tree4f0ee222ee8dface9079d5bf73c5db6a90061e2b /src
parent22194a000ac877c9a29096cffd215e52a06a6b40 (diff)
Produce a more useful error message when rustfmt can't be found. Fixes #1205
Prior to this change bindgen would simply print any error that occurred while attempting to run rustfmt straight to stderr using fmt::Debug. Combined with the fact that rustfmt is enabled by default now this meant that if rustfmt was missing or not working a cryptic error would be printed.
Diffstat (limited to 'src')
-rw-r--r--src/lib.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib.rs b/src/lib.rs
index c24af26c..e3906612 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -1835,7 +1835,7 @@ impl Bindings {
writer.write(rustfmt_bindings.as_bytes())?;
},
Err(err) => {
- eprintln!("{:?}", err);
+ eprintln!("Failed to run rustfmt: {} (non-fatal, continuing)", err);
writer.write(bindings.as_bytes())?;
},
}